Completed
Push — master ( f80c85...97f147 )
by Amine
01:50
created
src/object.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,8 +72,9 @@  discard block
 block discarded – undo
72 72
  */
73 73
 function attributes() {
74 74
     $attrs = function($object) {
75
-        if (is_object($object))
76
-            return get_object_vars($object);
75
+        if (is_object($object)) {
76
+                    return get_object_vars($object);
77
+        }
77 78
         return $object;
78 79
     };
79 80
     return apply(curry($attrs), func_get_args());
@@ -208,8 +209,9 @@  discard block
 block discarded – undo
208 209
 function getPath() {
209 210
     $getPath = function($path, $object){
210 211
         return reduce(function($result, $name) {
211
-            if ($result !== null)
212
-                $result = get($name, $result);
212
+            if ($result !== null) {
213
+                            $result = get($name, $result);
214
+            }
213 215
             return $result;
214 216
         }, $object, $path);
215 217
     };
@@ -237,10 +239,11 @@  discard block
 block discarded – undo
237 239
 function set() {
238 240
     $set = function($name, $value, $object) {
239 241
         $object = clone_($object);
240
-        if (is_object($object))
241
-            $object->{$name} = $value;
242
-        else
243
-            $object[$name] = $value;
242
+        if (is_object($object)) {
243
+                    $object->{$name} = $value;
244
+        } else {
245
+                    $object[$name] = $value;
246
+        }
244 247
         return $object;
245 248
     };
246 249
     return apply(curry($set), func_get_args());
Please login to merge, or discard this patch.