@@ -52,15 +52,13 @@ |
||
| 52 | 52 | * |
| 53 | 53 | * @extends TypedCollection<object> |
| 54 | 54 | */ |
| 55 | -class ObjectCollection extends TypedCollection |
|
| 56 | -{ |
|
| 55 | +class ObjectCollection extends TypedCollection { |
|
| 57 | 56 | |
| 58 | 57 | /** |
| 59 | 58 | * Create new instance |
| 60 | 59 | * @param array<mixed, object> $data |
| 61 | 60 | */ |
| 62 | - public function __construct(array $data = []) |
|
| 63 | - { |
|
| 61 | + public function __construct(array $data = []) { |
|
| 64 | 62 | parent::__construct('object', $data); |
| 65 | 63 | } |
| 66 | 64 | } |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | * @package Platine\Collection |
| 52 | 52 | * @template T |
| 53 | 53 | */ |
| 54 | -interface MergeableInterface |
|
| 55 | -{ |
|
| 54 | +interface MergeableInterface { |
|
| 56 | 55 | /** |
| 57 | 56 | * Merge with the given collection |
| 58 | 57 | * @param BaseCollection<T> $collection |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | * @package Platine\Collection |
| 52 | 52 | * @template T |
| 53 | 53 | */ |
| 54 | -interface SortableInterface |
|
| 55 | -{ |
|
| 54 | +interface SortableInterface { |
|
| 56 | 55 | /** |
| 57 | 56 | * Sort the collection |
| 58 | 57 | * @param callable $callback |
@@ -68,8 +68,7 @@ |
||
| 68 | 68 | * Create new instance |
| 69 | 69 | * @param array<mixed, T> $initials |
| 70 | 70 | */ |
| 71 | - public function __construct(array $initials = []) |
|
| 72 | - { |
|
| 71 | + public function __construct(array $initials = []) { |
|
| 73 | 72 | $this->data = new DataContainer($initials); |
| 74 | 73 | } |
| 75 | 74 | |
@@ -50,15 +50,13 @@ |
||
| 50 | 50 | * @class Pair |
| 51 | 51 | * @package Platine\Collection\Map |
| 52 | 52 | */ |
| 53 | -class Pair |
|
| 54 | -{ |
|
| 53 | +class Pair { |
|
| 55 | 54 | /** |
| 56 | 55 | * Create new instance |
| 57 | 56 | * @param mixed $key |
| 58 | 57 | * @param mixed $value |
| 59 | 58 | */ |
| 60 | - public function __construct(protected mixed $key, protected mixed $value) |
|
| 61 | - { |
|
| 59 | + public function __construct(protected mixed $key, protected mixed $value) { |
|
| 62 | 60 | } |
| 63 | 61 | |
| 64 | 62 | /** |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | * @class MapInterface |
| 51 | 51 | * @package Platine\Collection\Map |
| 52 | 52 | */ |
| 53 | -interface MapInterface |
|
| 54 | -{ |
|
| 53 | +interface MapInterface { |
|
| 55 | 54 | /** |
| 56 | 55 | * Add element to the collection |
| 57 | 56 | * @param mixed $key |
@@ -52,15 +52,13 @@ |
||
| 52 | 52 | * @template T |
| 53 | 53 | * @extends Collection<T> |
| 54 | 54 | */ |
| 55 | -class TypedCollection extends Collection |
|
| 56 | -{ |
|
| 55 | +class TypedCollection extends Collection { |
|
| 57 | 56 | /** |
| 58 | 57 | * Create new instance |
| 59 | 58 | * @param string $type |
| 60 | 59 | * @param array<mixed, T> $data |
| 61 | 60 | */ |
| 62 | - public function __construct(protected string $type, array $data = []) |
|
| 63 | - { |
|
| 61 | + public function __construct(protected string $type, array $data = []) { |
|
| 64 | 62 | parent::__construct($data, $type); |
| 65 | 63 | } |
| 66 | 64 | |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | * @class Stack |
| 55 | 55 | * @package Platine\Collection\Stack |
| 56 | 56 | */ |
| 57 | -class Stack implements Countable |
|
| 58 | -{ |
|
| 57 | +class Stack implements Countable { |
|
| 59 | 58 | /** |
| 60 | 59 | * |
| 61 | 60 | * @var array<int, mixed> |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | * Create new instance |
| 67 | 66 | * @param string $type |
| 68 | 67 | */ |
| 69 | - public function __construct(protected string $type) |
|
| 70 | - { |
|
| 68 | + public function __construct(protected string $type) { |
|
| 71 | 69 | } |
| 72 | 70 | |
| 73 | 71 | /** |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | * @class CollectionInterface |
| 51 | 51 | * @package Platine\Collection |
| 52 | 52 | */ |
| 53 | -interface CollectionInterface |
|
| 54 | -{ |
|
| 53 | +interface CollectionInterface { |
|
| 55 | 54 | /** |
| 56 | 55 | * Add element to the collection |
| 57 | 56 | * @param mixed $value |