Passed
Push — features/47-laravelmethods ( 9642d7...9881c8 )
by Luke
04:14
created
src/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 {
172 172
     $type = gettype($data);
173 173
     if ($meta) {
174
-        switch($type) {
174
+        switch ($type) {
175 175
             case 'object':
176 176
                 $class = get_class($data);
177 177
                 return "{$type} <{$class}>";
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                 return "{$type} <{$restype}>";
181 181
         }
182 182
     } else {
183
-        switch($type) {
183
+        switch ($type) {
184 184
             case 'object':
185 185
                 return get_class($data);
186 186
             case 'resource':
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     } else {
271 271
         echo $label . "\n" . implode(
272 272
                 array_map(
273
-                    function () {
273
+                    function() {
274 274
                         return '-';
275 275
                     },
276 276
                     str_split($label)
Please login to merge, or discard this patch.
src/Collection/Sequence.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * You may optionally pass in a callback which will determine if each of the items within the collection are empty.
135 135
      * If all items in the collection are empty according to this callback, this method will return true.
136 136
      * @param callable $callback The callback
137
-     * @return bool
137
+     * @return boolean|null
138 138
      */
139 139
     public function isEmpty(callable $callback = null)
140 140
     {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      * If callback is provided, this method will return true if all items in collection cause callback to return true.
158 158
      * Otherwise, it will return true if all items in the collection have a truthy value.
159 159
      * @param callable|null $callback The callback
160
-     * @return bool
160
+     * @return boolean|null
161 161
      */
162 162
     public function every(callable $callback = null)
163 163
     {
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      * Does every item return false?
169 169
      * This method is the exact opposite of "all".
170 170
      * @param callable|null $callback The callback
171
-     * @return bool
171
+     * @return boolean|null
172 172
      */
173 173
     public function none(callable $callback = null)
174 174
     {
Please login to merge, or discard this patch.
src/Contracts/CollectionInterface.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @param string|int $index Set value at this index
63 63
      * @param mixed      $value Set this value at index
64 64
      *
65
-     * @return mixed
65
+     * @return CollectionInterface
66 66
      */
67 67
     public function set($index, $value);
68 68
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @param string|int $index Delete item at this index
75 75
      *
76
-     * @return mixed
76
+     * @return CollectionInterface
77 77
      */
78 78
     public function delete($index);
79 79
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * @param string|int $index Add value at this index
109 109
      * @param mixed      $value Add this value at index
110 110
      *
111
-     * @return mixed
111
+     * @return CollectionInterface
112 112
      */
113 113
     public function add($index, $value);
114 114
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * @param int  $nth    The number of items between cycles
165 165
      * @param null $offset An optional offset to begin from
166 166
      *
167
-     * @return mixed
167
+     * @return CollectionInterface
168 168
      */
169 169
     public function nth($nth, $offset = null);
170 170
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      *
229 229
      * @param int $num Number of items to return
230 230
      *
231
-     * @return mixed|CollectionInterface
231
+     * @return CollectionInterface
232 232
      */
233 233
     public function random($num);
234 234
 
Please login to merge, or discard this patch.
src/Collection/Collection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      */
348 348
     public function contains($value, $index = null)
349 349
     {
350
-        return (bool) $this->first(function ($val, $key) use ($value, $index) {
350
+        return (bool) $this->first(function($val, $key) use ($value, $index) {
351 351
             if (is_callable($value)) {
352 352
                 $found = $value($val, $key);
353 353
             } else {
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
     public function pairs()
627 627
     {
628 628
         return collect(array_map(
629
-            function ($key, $val) {
629
+            function($key, $val) {
630 630
                 return [$key, $val];
631 631
             },
632 632
             array_keys($this->getData()),
@@ -645,11 +645,11 @@  discard block
 block discarded – undo
645 645
     public function duplicates()
646 646
     {
647 647
         $dups = [];
648
-        $this->walk(function ($val, $key) use (&$dups) {
648
+        $this->walk(function($val, $key) use (&$dups) {
649 649
             $dups[$val][] = $key;
650 650
         });
651 651
 
652
-        return collect($dups)->filter(function ($val) {
652
+        return collect($dups)->filter(function($val) {
653 653
             return count($val) > 1;
654 654
         });
655 655
     }
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
     public function split($num)
937 937
     {
938 938
         $count = $this->count();
939
-        $size = (int)($count / $num);
939
+        $size = (int) ($count / $num);
940 940
         $mod = $count % $num;
941 941
         return collect($this->foldRight(function($chunks, $val, $key, $iter) use ($num, $size, $mod) {
942 942
             $chunk_count = count($chunks);
Please login to merge, or discard this patch.