Completed
Pull Request — master (#115)
by
unknown
03:06
created
src/Relay/Connection/ArrayConnection.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@  discard block
 block discarded – undo
15 15
 
16 16
     public static function cursorForObjectInConnection($data, $object)
17 17
     {
18
-        if (!is_array($data)) return null;
18
+        if (!is_array($data)) {
19
+            return null;
20
+        }
19 21
 
20 22
         $index = array_search($object, $data);
21 23
         return $index === false ? null : (string) self::keyToCursor($index);
@@ -81,8 +83,7 @@  discard block
 block discarded – undo
81 83
         $key = self::cursorToKey($cursor);
82 84
         if (empty($array)) {
83 85
           $offset = $key;
84
-        }
85
-        else {
86
+        } else {
86 87
           $offset = array_search($key, array_keys($array));
87 88
         }
88 89
 
Please login to merge, or discard this patch.