@@ -73,8 +73,7 @@ discard block |
||
73 | 73 | * Create new instance |
74 | 74 | * @param array<mixed, mixed> $data |
75 | 75 | */ |
76 | - public function __construct(array $data = []) |
|
77 | - { |
|
76 | + public function __construct(array $data = []) { |
|
78 | 77 | foreach ($data as $value) { |
79 | 78 | $this->validateEntry($value); |
80 | 79 | } |
@@ -180,8 +179,7 @@ discard block |
||
180 | 179 | * @return mixed |
181 | 180 | * @throws OutOfRangeException |
182 | 181 | */ |
183 | - public function get(int $offset) |
|
184 | - { |
|
182 | + public function get(int $offset) { |
|
185 | 183 | if ($this->isEmpty()) { |
186 | 184 | throw new OutOfRangeException('The collection is empty'); |
187 | 185 | } |
@@ -268,8 +266,7 @@ discard block |
||
268 | 266 | * Return a random element of the collection |
269 | 267 | * @return mixed |
270 | 268 | */ |
271 | - public function rand() |
|
272 | - { |
|
269 | + public function rand() { |
|
273 | 270 | if ($this->isEmpty()) { |
274 | 271 | throw new InvalidOperationException('The collection is empty'); |
275 | 272 | } |
@@ -52,15 +52,13 @@ |
||
52 | 52 | * @template Object |
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, mixed> $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 | } |
@@ -55,16 +55,14 @@ |
||
55 | 55 | * @template T |
56 | 56 | * @extends Collection<T> |
57 | 57 | */ |
58 | -class TypedCollection extends Collection |
|
59 | -{ |
|
58 | +class TypedCollection extends Collection { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param string $type |
64 | 63 | * @param array<mixed, mixed> $data |
65 | 64 | */ |
66 | - public function __construct(string $type, array $data = []) |
|
67 | - { |
|
65 | + public function __construct(string $type, array $data = []) { |
|
68 | 66 | $this->type = $type; |
69 | 67 | parent::__construct($data); |
70 | 68 | } |