Passed
Push — master ( d3ce08...00ecc8 )
by Andrew
02:14
created
lib/XMLReaderElement.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     protected function convertAttributes($attributes)
78 78
     {
79
-        foreach($attributes as $k=>$attribute)
79
+        foreach ($attributes as $k=>$attribute)
80 80
         {
81 81
             $attributes[$k] = $this->convertValue($attribute);
82 82
         }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         if (is_array($this->value)) {
140 140
             $results = [];
141
-            foreach($this->value as $value) {
141
+            foreach ($this->value as $value) {
142 142
                 if ($value instanceof XMLReaderElement) {
143 143
                     $results[] = $value;
144 144
                 }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         if ($this->name == $search)
162 162
             $results[] = $this;
163 163
 
164
-        foreach($this->children() as $child) {
164
+        foreach ($this->children() as $child) {
165 165
             $results = array_merge($results, $child->find($search));
166 166
         }
167 167
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         /* Access the Elements Attributes */
180 180
         if (is_array($this->value)) {
181
-            foreach($this->value as $value) {
181
+            foreach ($this->value as $value) {
182 182
                 if ($value instanceof XMLReaderElement && $value->name == $name) {
183 183
                     return $value;
184 184
                 }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
         if (!empty($this->children())) {
204 204
             $names = [];
205
-            foreach($this->children() as $child) {
205
+            foreach ($this->children() as $child) {
206 206
                 $names[] = $child->name;
207 207
             }
208 208
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,8 +161,9 @@
 block discarded – undo
161 161
 
162 162
         if ($search[0] == '@') {
163 163
             $search = substr($search, 1);
164
-            if (property_exists($this->attributes, $search))
165
-                $results[] = $this->attributes->$search;
164
+            if (property_exists($this->attributes, $search)) {
165
+                            $results[] = $this->attributes->$search;
166
+            }
166 167
         }
167 168
 
168 169
         return $results;
Please login to merge, or discard this patch.