Commaaa2
This commit is contained in:
13
vendor/ramsey/collection/src/Collection.php
vendored
13
vendor/ramsey/collection/src/Collection.php
vendored
@@ -75,25 +75,16 @@ namespace Ramsey\Collection;
|
||||
*/
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
/**
|
||||
* The type of elements stored in this collection.
|
||||
*
|
||||
* A collection's type is immutable once it is set. For this reason, this
|
||||
* property is set private.
|
||||
*/
|
||||
private string $collectionType;
|
||||
|
||||
/**
|
||||
* Constructs a collection object of the specified type, optionally with the
|
||||
* specified data.
|
||||
*
|
||||
* @param string $collectionType The type (FQCN) associated with this
|
||||
* @param string $collectionType The type or class name associated with this
|
||||
* collection.
|
||||
* @param array<array-key, T> $data The initial items to store in the collection.
|
||||
*/
|
||||
public function __construct(string $collectionType, array $data = [])
|
||||
public function __construct(private readonly string $collectionType, array $data = [])
|
||||
{
|
||||
$this->collectionType = $collectionType;
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user