@@ -73,10 +73,10 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, $pa
73
73
$ this ->parseRoute ($ collection , $ node , $ path );
74
74
break ;
75
75
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 ' );
80
80
81
81
$ defaults = array ();
82
82
$ requirements = array ();
@@ -89,13 +89,13 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, $pa
89
89
90
90
switch ($ n ->tagName ) {
91
91
case 'default ' :
92
- $ defaults [( string ) $ n ->getAttribute ('key ' )] = trim (( string ) $ n ->nodeValue );
92
+ $ defaults [$ n ->getAttribute ('key ' )] = trim ($ n ->nodeValue );
93
93
break ;
94
94
case 'requirement ' :
95
- $ requirements [( string ) $ n ->getAttribute ('key ' )] = trim (( string ) $ n ->nodeValue );
95
+ $ requirements [$ n ->getAttribute ('key ' )] = trim ($ n ->nodeValue );
96
96
break ;
97
97
case 'option ' :
98
- $ options [( string ) $ n ->getAttribute ('key ' )] = trim (( string ) $ n ->nodeValue );
98
+ $ options [$ n ->getAttribute ('key ' )] = trim ($ n ->nodeValue );
99
99
break ;
100
100
default :
101
101
throw new \InvalidArgumentException (sprintf ('Unable to parse tag "%s" ' , $ n ->tagName ));
@@ -142,22 +142,22 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $definiti
142
142
143
143
switch ($ node ->tagName ) {
144
144
case 'default ' :
145
- $ defaults [( string ) $ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
145
+ $ defaults [$ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
146
146
break ;
147
147
case 'option ' :
148
- $ options [( string ) $ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
148
+ $ options [$ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
149
149
break ;
150
150
case 'requirement ' :
151
- $ requirements [( string ) $ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
151
+ $ requirements [$ node ->getAttribute ('key ' )] = trim ((string ) $ node ->nodeValue );
152
152
break ;
153
153
default :
154
154
throw new \InvalidArgumentException (sprintf ('Unable to parse tag "%s" ' , $ node ->tagName ));
155
155
}
156
156
}
157
157
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 ' ));
159
159
160
- $ collection ->add (( string ) $ definition ->getAttribute ('id ' ), $ route );
160
+ $ collection ->add ($ definition ->getAttribute ('id ' ), $ route );
161
161
}
162
162
163
163
/**
0 commit comments