Passed
Push — develop ( b732dc...a7a9ff )
by nguereza
12:25
created
src/BaseCollection.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Map/HashMap.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
                 : null;
207 207
     }
208 208
 
209
-     /**
210
-      *
211
-      * @param BaseCollection<T> $collection
212
-      * @return bool
213
-      * @throws InvalidOperationException
214
-      */
209
+        /**
210
+         *
211
+         * @param BaseCollection<T> $collection
212
+         * @return bool
213
+         * @throws InvalidOperationException
214
+         */
215 215
     public function equals(BaseCollection $collection): bool
216 216
     {
217 217
         if (!$collection instanceof self) {
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
         $this->initializePairs($data);
237 237
     }
238 238
 
239
-     /**
240
-      * Return the value for given key
241
-      * @param mixed $key
242
-      * @return T|null
243
-      */
239
+        /**
240
+         * Return the value for given key
241
+         * @param mixed $key
242
+         * @return T|null
243
+         */
244 244
     public function get(mixed $key): mixed
245 245
     {
246 246
         return $this->data->offsetExists($key)
@@ -248,11 +248,11 @@  discard block
 block discarded – undo
248 248
                : null;
249 249
     }
250 250
 
251
-     /**
252
-     * {@inheritedoc}
253
-      * @param HashMap<T> $collection
254
-      * @return HashMap<T>
255
-     */
251
+        /**
252
+         * {@inheritedoc}
253
+         * @param HashMap<T> $collection
254
+         * @return HashMap<T>
255
+         */
256 256
     public function merge(BaseCollection $collection): BaseCollection
257 257
     {
258 258
         TypeCheck::isEqual(
@@ -296,9 +296,9 @@  discard block
 block discarded – undo
296 296
         throw new InvalidOperationException('Can not call this method in map');
297 297
     }
298 298
 
299
-     /**
300
-     * {@inheritedoc}
301
-     */
299
+        /**
300
+         * {@inheritedoc}
301
+         */
302 302
     public function remove(mixed $key): void
303 303
     {
304 304
         if ($this->isEmpty()) {
@@ -315,12 +315,12 @@  discard block
 block discarded – undo
315 315
         $this->data->offsetUnset($key);
316 316
     }
317 317
 
318
-     /**
319
-      *
320
-      * @param int $offset
321
-      * @param int|null $length
322
-      * @return HashMap<T>|null
323
-      */
318
+        /**
319
+         *
320
+         * @param int $offset
321
+         * @param int|null $length
322
+         * @return HashMap<T>|null
323
+         */
324 324
     public function slice(int $offset, ?int $length = null): ?BaseCollection
325 325
     {
326 326
         $newData = array_slice($this->all(), $offset, $length, true);
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
             : null;
335 335
     }
336 336
 
337
-     /**
338
-      *
339
-      * @param callable $callback
340
-      * @return HashMap<T>|null
341
-      */
337
+        /**
338
+         *
339
+         * @param callable $callback
340
+         * @return HashMap<T>|null
341
+         */
342 342
     public function sort(callable $callback): ?BaseCollection
343 343
     {
344 344
         $data = $this->all();
Please login to merge, or discard this patch.
src/Map/Pair.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,15 +50,13 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Map/MapInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/TypedCollection.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,15 +52,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Stack/Stack.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/CollectionInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Exception/InvalidOperationException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class InvalidOperationException
39 39
  * @package Platine\Collection\Exception
40 40
  */
41
-class InvalidOperationException extends Exception
42
-{
41
+class InvalidOperationException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/TypeCheck.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class TypeCheck
53 53
  * @package Platine\Collection
54 54
  */
55
-class TypeCheck
56
-{
55
+class TypeCheck {
57 56
     /**
58 57
      *
59 58
      * @param mixed $value1
Please login to merge, or discard this patch.