1- <?php namespace Illuminate \Support ;
1+ <?php
2+
3+ namespace Illuminate \Support ;
24
35use Countable ;
46use ArrayAccess ;
@@ -17,7 +19,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate
1719 *
1820 * @var array
1921 */
20- protected $ items = array () ;
22+ protected $ items = [] ;
2123
2224 /**
2325 * Create a new collection.
@@ -77,7 +79,7 @@ public function contains($key, $value = null)
7779 }
7880
7981 if ($ this ->useAsCallable ($ key )) {
80- return ! is_null ($ this ->first ($ key ));
82+ return !is_null ($ this ->first ($ key ));
8183 }
8284
8385 return in_array ($ key , $ this ->items );
@@ -244,7 +246,7 @@ public function groupBy($groupBy, $preserveKeys = false)
244246 foreach ($ this ->items as $ key => $ value ) {
245247 $ groupKey = $ groupBy ($ value , $ key );
246248
247- if (! array_key_exists ($ groupKey , $ results )) {
249+ if (!array_key_exists ($ groupKey , $ results )) {
248250 $ results [$ groupKey ] = new static ;
249251 }
250252
@@ -305,7 +307,7 @@ public function implode($value, $glue = null)
305307 /**
306308 * Intersect the collection with the given items.
307309 *
308- * @param mixed $items
310+ * @param mixed $items
309311 * @return static
310312 */
311313 public function intersect ($ items )
@@ -331,7 +333,7 @@ public function isEmpty()
331333 */
332334 protected function useAsCallable ($ value )
333335 {
334- return ! is_string ($ value ) && is_callable ($ value );
336+ return !is_string ($ value ) && is_callable ($ value );
335337 }
336338
337339 /**
@@ -529,7 +531,7 @@ public function reject($callback)
529531 {
530532 if ($ this ->useAsCallable ($ callback )) {
531533 return $ this ->filter (function ($ item ) use ($ callback ) {
532- return ! $ callback ($ item );
534+ return !$ callback ($ item );
533535 });
534536 }
535537
@@ -557,7 +559,7 @@ public function reverse()
557559 */
558560 public function search ($ value , $ strict = false )
559561 {
560- if (! $ this ->useAsCallable ($ value )) {
562+ if (!$ this ->useAsCallable ($ value )) {
561563 return array_search ($ value , $ this ->items , $ strict );
562564 }
563565
@@ -803,7 +805,7 @@ protected function valueRetriever($value)
803805 }
804806
805807 /**
806- * Zip the collection together with one or more arrays
808+ * Zip the collection together with one or more arrays.
807809 *
808810 * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]);
809811 * => [[1, 4], [2, 5], [3, 6]]
@@ -951,7 +953,7 @@ public function __toString()
951953 /**
952954 * Results array of items from Collection or Arrayable.
953955 *
954- * @param mixed $items
956+ * @param mixed $items
955957 * @return array
956958 */
957959 protected function getArrayableItems ($ items )
0 commit comments