Browse Source

Simplify every()

Marc Würth 9 years ago
parent
commit
f6116cd3e8
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/Collection/CollectionTrait.php

+ 1 - 2
src/Collection/CollectionTrait.php

@@ -89,14 +89,13 @@ trait CollectionTrait
      */
     public function every(callable $c)
     {
-        $return = true;
         foreach ($this->unwrap() as $key => $value) {
             if (!$c($value, $key)) {
                 return false;
             }
         }
 
-        return $return;
+        return true;
     }
 
     /**