Passed
Push — master ( 671532...7e708d )
by Andrew
02:06
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   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,8 +158,9 @@  discard block
 block discarded – undo
158 158
 
159 159
         $results = [];
160 160
 
161
-        if ($this->name == $search)
162
-            $results[] = $this;
161
+        if ($this->name == $search) {
162
+                    $results[] = $this;
163
+        }
163 164
 
164 165
         foreach($this->children() as $child) {
165 166
             $results = array_merge($results, $child->find($search));
@@ -167,8 +168,9 @@  discard block
 block discarded – undo
167 168
 
168 169
         if ($search[0] == '@') {
169 170
             $search = substr($search, 1);
170
-            if (property_exists($this->attributes, $search))
171
-                $results[] = $this->attributes->$search;
171
+            if (property_exists($this->attributes, $search)) {
172
+                            $results[] = $this->attributes->$search;
173
+            }
172 174
         }
173 175
 
174 176
         return $results;
Please login to merge, or discard this patch.