Completed
Push — master ( 874053...fdc6df )
by Antonio Carlos
03:51
created
src/package/Coollection.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      * Get an array as a key.
252 252
      *
253 253
      * @param $key
254
-     * @return mixed|string
254
+     * @return string
255 255
      */
256 256
     private function getArrayKey($key)
257 257
     {
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     /**
328 328
      * Get a property by name.
329 329
      *
330
-     * @param $key
330
+     * @param string $key
331 331
      * @return string|static
332 332
      */
333 333
     private function getByPropertyName($key)
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
     /**
347 347
      * Execute a closure via Laravel's Collection
348 348
      *
349
-     * @param $closure
349
+     * @param Closure $closure
350 350
      * @param null $method
351 351
      * @return mixed
352 352
      */
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 
496 496
     /**
497 497
      * @param $originalCallback
498
-     * @return callable
498
+     * @return Closure
499 499
      */
500 500
     public function coollectizeCallback(callable $originalCallback = null)
501 501
     {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 
509 509
     /**
510 510
      * @param $originalCallback
511
-     * @return callable
511
+     * @return Closure
512 512
      */
513 513
     public function coollectizeCallbackForReduce(callable $originalCallback)
514 514
     {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function call($name, $arguments = [])
105 105
     {
106
-        return $this->runViaLaravelCollection(function ($collection) use ($name, $arguments) {
106
+        return $this->runViaLaravelCollection(function($collection) use ($name, $arguments) {
107 107
             return call_user_func_array(
108 108
                 [$collection, $name],
109 109
                 $this->coollectizeCallbacks($this->__toArray($arguments), $name)
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $value = is_null($value) ? $this->items : $value;
123 123
 
124
-        if (! $this->isArrayable($value)) {
124
+        if (!$this->isArrayable($value)) {
125 125
             return $value;
126 126
         }
127 127
 
128
-        $result = array_map(function ($value) {
128
+        $result = array_map(function($value) {
129 129
             if ($this->isArrayable($value)) {
130 130
                 return new static($value);
131 131
             }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function toArray()
145 145
     {
146
-        return array_map(function ($value) {
146
+        return array_map(function($value) {
147 147
             return $value instanceof Arrayable ? $value->toArray() : $value;
148 148
         }, $this->items);
149 149
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             return null;
171 171
         }
172 172
 
173
-        return $this->runViaLaravelCollection(function ($collection) use ($key) {
173
+        return $this->runViaLaravelCollection(function($collection) use ($key) {
174 174
             return new HigherOrderCollectionProxy($collection, $key);
175 175
         });
176 176
     }
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $value = is_null($value) ? $this->items : $value;
187 187
 
188
-        if (! $this->isArrayable($value)) {
188
+        if (!$this->isArrayable($value)) {
189 189
             return $value;
190 190
         }
191 191
 
192
-        $result = array_map(function ($value) {
192
+        $result = array_map(function($value) {
193 193
             if ($this->isArrayable($value)) {
194 194
                 return $this->__toArray($value);
195 195
             }
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             lower($key),
270 270
         ];
271 271
 
272
-        $data = $this->filter(function ($value,  $key) use ($cases) {
272
+        $data = $this->filter(function($value, $key) use ($cases) {
273 273
             return array_search($key, $cases) !== false || array_search(lower($key), $cases) !== false;
274 274
         })->keys()->first();
275 275
 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 
357 357
         $result = $closure($collection);
358 358
 
359
-        if (! $this->methodMustReturnArray($method)) {
359
+        if (!$this->methodMustReturnArray($method)) {
360 360
             $result = $this->coollectizeItems($result);
361 361
         }
362 362
 
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
      */
441 441
     public function offsetGet($key)
442 442
     {
443
-        if (! isset($this->items[$key])) {
443
+        if (!isset($this->items[$key])) {
444 444
             return null;
445 445
         }
446 446
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
      */
500 500
     public function coollectizeCallback(callable $originalCallback = null)
501 501
     {
502
-        return function ($value = null, $key = null) use ($originalCallback) {
502
+        return function($value = null, $key = null) use ($originalCallback) {
503 503
             return $originalCallback(
504 504
                 $this->__wrap($value), $key
505 505
             );
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
      */
513 513
     public function coollectizeCallbackForReduce(callable $originalCallback)
514 514
     {
515
-        return function ($carry, $item) use ($originalCallback) {
515
+        return function($carry, $item) use ($originalCallback) {
516 516
             return $originalCallback(
517 517
                 $carry,
518 518
                 $this->__wrap($item)
Please login to merge, or discard this patch.