Passed
Push — 0.7.0 ( 9eca06...f20096 )
by Alexander
03:01 queued 10s
created
src/components/Collections/Arr.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,7 +232,9 @@  discard block
 block discarded – undo
232 232
 	public static function first($array, callable $callback, $default = null)
233 233
 	{
234 234
 		foreach ($array as $key => $value) { 
235
-			if (call_user_func($callback, $key, $value)) return $value;
235
+			if (call_user_func($callback, $key, $value)) {
236
+			    return $value;
237
+			}
236 238
 		}
237 239
 
238 240
 		return value($default);
@@ -294,9 +296,13 @@  discard block
 block discarded – undo
294 296
 	 */
295 297
 	public static function has($array, $key)
296 298
 	{
297
-		if (empty($array) || is_null($key)) return false;
299
+		if (empty($array) || is_null($key)) {
300
+		    return false;
301
+		}
298 302
 		
299
-		if (array_key_exists($key, $array)) return true;
303
+		if (array_key_exists($key, $array)) {
304
+		    return true;
305
+		}
300 306
 		
301 307
 		foreach (explode('.', $key) as $segment) {
302 308
 			if ( ! is_array($array) || ! static::exists($array, $segment)) {
Please login to merge, or discard this patch.