@@ -73,10 +73,10 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, $pa
7373 $ this ->parseRoute ($ collection , $ node , $ path );
7474 break ;
7575 case 'import ' :
76- $ resource = ( string ) $ node ->getAttribute ('resource ' );
77- $ type = ( string ) $ node ->getAttribute ('type ' );
78- $ prefix = ( string ) $ node ->getAttribute ('prefix ' );
79- $ hostnamePattern = ( string ) $ node ->getAttribute ('hostname-pattern ' );
76+ $ resource = $ node ->getAttribute ('resource ' );
77+ $ type = $ node ->getAttribute ('type ' );
78+ $ prefix = $ node ->getAttribute ('prefix ' );
79+ $ hostnamePattern = $ node ->getAttribute ('hostname-pattern ' );
8080
8181 $ defaults = array ();
8282 $ requirements = array ();
@@ -89,13 +89,13 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, $pa
8989
9090 switch ($ n ->tagName ) {
9191 case 'default ' :
92- $ defaults [( string ) $ n ->getAttribute ('key ' )] = trim (( string ) $ n ->nodeValue );
92+ $ defaults [$ n ->getAttribute ('key ' )] = trim ($ n ->nodeValue );
9393 break ;
9494 case 'requirement ' :
95- $ requirements [( string ) $ n ->getAttribute ('key ' )] = trim (( string ) $ n ->nodeValue );
95+ $ requirements [$ n ->getAttribute ('key ' )] = trim ($ n ->nodeValue );
9696 break ;
9797 case 'option ' :
98- $ options [( string ) $ n ->getAttribute ('key ' )] = trim (( string ) $ n ->nodeValue );
98+ $ options [$ n ->getAttribute ('key ' )] = trim ($ n ->nodeValue );
9999 break ;
100100 default :
101101 throw new \InvalidArgumentException (sprintf ('Unable to parse tag "%s" ' , $ n ->tagName ));
@@ -142,22 +142,22 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $definiti
142142
143143 switch ($ node ->tagName ) {
144144 case 'default ' :
145- $ defaults [( string ) $ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
145+ $ defaults [$ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
146146 break ;
147147 case 'option ' :
148- $ options [( string ) $ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
148+ $ options [$ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
149149 break ;
150150 case 'requirement ' :
151- $ requirements [( string ) $ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
151+ $ requirements [$ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
152152 break ;
153153 default :
154154 throw new \InvalidArgumentException (sprintf ('Unable to parse tag "%s" ' , $ node ->tagName ));
155155 }
156156 }
157157
158- $ route = new Route (( string ) $ definition ->getAttribute ('pattern ' ), $ defaults , $ requirements , $ options , ( string ) $ definition ->getAttribute ('hostname-pattern ' ));
158+ $ route = new Route ($ definition ->getAttribute ('pattern ' ), $ defaults , $ requirements , $ options , $ definition ->getAttribute ('hostname-pattern ' ));
159159
160- $ collection ->add (( string ) $ definition ->getAttribute ('id ' ), $ route );
160+ $ collection ->add ($ definition ->getAttribute ('id ' ), $ route );
161161 }
162162
163163 /**
0 commit comments