@@ -62,7 +62,7 @@ function parse() {
6262 // choice. See:
6363 //
6464 // https://bugs.php.net/bug.php?id=64230
65- while ($ this ->nodeType !== self ::ELEMENT && @$ this ->read ()) {
65+ while ($ this ->nodeType !== self ::ELEMENT && @$ this ->read ()) {
6666 // noop
6767 }
6868 $ result = $ this ->parseCurrentElement ();
@@ -119,9 +119,9 @@ function parseInnerTree(array $elementMap = null) {
119119 // https://bugs.php.net/bug.php?id=64230
120120 if (!@$ this ->read ()) return false ;
121121
122- while (true ) {
122+ while (true ) {
123123
124- switch ($ this ->nodeType ) {
124+ switch ($ this ->nodeType ) {
125125 case self ::ELEMENT :
126126 $ elements [] = $ this ->parseCurrentElement ();
127127 break ;
@@ -147,7 +147,7 @@ function parseInnerTree(array $elementMap = null) {
147147 if (!is_null ($ elementMap )) {
148148 $ this ->popContext ();
149149 }
150- return ($ elements? $ elements: $ text );
150+ return ($ elements ? $ elements : $ text );
151151
152152 }
153153
@@ -161,9 +161,9 @@ function readText() {
161161 $ result = '' ;
162162 $ previousDepth = $ this ->depth ;
163163
164- while ($ this ->read () && $ this ->depth != $ previousDepth ) {
164+ while ($ this ->read () && $ this ->depth != $ previousDepth ) {
165165 if (in_array ($ this ->nodeType , [XMLReader::TEXT , XMLReader::CDATA , XMLReader::WHITESPACE ])) {
166- $ result.= $ this ->value ;
166+ $ result .= $ this ->value ;
167167 }
168168 }
169169 return $ result ;
@@ -193,25 +193,25 @@ function parseCurrentElement() {
193193 if (array_key_exists ($ name , $ this ->elementMap )) {
194194 $ deserializer = $ this ->elementMap [$ name ];
195195 if (is_subclass_of ($ deserializer , 'Sabre \\Xml \\XmlDeserializable ' )) {
196- $ value = call_user_func ( [ $ deserializer , 'xmlDeserialize ' ], $ this );
196+ $ value = call_user_func ([ $ deserializer , 'xmlDeserialize ' ], $ this );
197197 } elseif (is_callable ($ deserializer )) {
198198 $ value = call_user_func ($ deserializer , $ this );
199199 } else {
200200 $ type = gettype ($ deserializer );
201- if ($ type ==='string ' ) {
202- $ type.= ' ( ' . $ deserializer . ') ' ;
203- } elseif ($ type ==='object ' ) {
204- $ type.= ' ( ' . get_class ($ deserializer ) . ') ' ;
201+ if ($ type === 'string ' ) {
202+ $ type .= ' ( ' . $ deserializer . ') ' ;
203+ } elseif ($ type === 'object ' ) {
204+ $ type .= ' ( ' . get_class ($ deserializer ) . ') ' ;
205205 }
206- throw new \LogicException ('Could not use this type as a deserializer: ' . $ type );
206+ throw new \LogicException ('Could not use this type as a deserializer: ' . $ type );
207207 }
208208 } else {
209209 $ value = Element \Base::xmlDeserialize ($ this );
210210 }
211211
212212 return [
213- 'name ' => $ name ,
214- 'value ' => $ value ,
213+ 'name ' => $ name ,
214+ 'value ' => $ value ,
215215 'attributes ' => $ attributes ,
216216 ];
217217 }
@@ -230,7 +230,7 @@ function parseAttributes() {
230230
231231 $ attributes = [];
232232
233- while ($ this ->moveToNextAttribute ()) {
233+ while ($ this ->moveToNextAttribute ()) {
234234 if ($ this ->namespaceURI ) {
235235
236236 // Ignoring 'xmlns', it doesn't make any sense.
0 commit comments