Passed
Push — master ( 5b203e...c64aae )
by Sam
02:10
created
src/Behaviors/JsonBehavior.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected function createMaps()
32 32
     {
33
-        foreach($this->jsonAttributes as $attribute) {
34
-            if(!$this->owner->$attribute instanceof Map) {
33
+        foreach ($this->jsonAttributes as $attribute) {
34
+            if (!$this->owner->$attribute instanceof Map) {
35 35
                 $this->owner->$attribute = new Map($this->owner->$attribute);
36 36
             }
37 37
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function init()
108 108
     {
109 109
         parent::init();
110
-        if(!isset($this->defaultAttribute) && count($this->jsonAttributes) == 1) {
110
+        if (!isset($this->defaultAttribute) && count($this->jsonAttributes) == 1) {
111 111
             $this->defaultAttribute = $this->jsonAttributes[0];
112 112
         }
113 113
     }
Please login to merge, or discard this patch.
src/Components/Map.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
             $this->data = $data;
19 19
         }
20 20
 
21
-        if(!is_array($this->data)) {
21
+        if (!is_array($this->data)) {
22 22
             throw new \DomainException('Data must be array or json encoded array');
23 23
         }
24 24
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         }
104 104
 
105 105
         if ($extraData instanceof self) {
106
-            foreach($extraData as $key => $value) {
106
+            foreach ($extraData as $key => $value) {
107 107
                 if (isset($this[$key])
108 108
                     && $value instanceof self
109 109
                     && $this[$key] instanceof self
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
     public function __clone()
132 132
     {
133
-        foreach($this->data as $key => $value) {
133
+        foreach ($this->data as $key => $value) {
134 134
             if ($value instanceof self) {
135 135
                 $this->data[$key] = clone $value;
136 136
             }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
     public function asArray() {
141 141
         $result = $this->data;
142
-        foreach($result as $key => $value) {
142
+        foreach ($result as $key => $value) {
143 143
             if ($value instanceof self) {
144 144
                 $result[$value] = $value->asArray();
145 145
             }
Please login to merge, or discard this patch.