@@ -109,7 +109,7 @@ public static function setFiles(array $files)
109109 public static function addFiles (array $ files )
110110 {
111111 if (self ::$ files ) {
112- self ::$ files = array_merge (self ::$ files , $ files );
112+ self ::$ files = \ array_merge (self ::$ files , $ files );
113113 } else {
114114 self ::$ files = $ files ;
115115 }
@@ -134,7 +134,7 @@ public function addPsr0($prefix, $path)
134134 public function addPsr0Map (array $ psr0Map )
135135 {
136136 if ($ this ->psr0Map ) {
137- $ this ->psr0Map = array_merge ($ this ->psr0Map , $ psr0Map );
137+ $ this ->psr0Map = \ array_merge ($ this ->psr0Map , $ psr0Map );
138138 } else {
139139 $ this ->psr0Map = $ psr0Map ;
140140 }
@@ -163,7 +163,7 @@ public function addPsr4($prefix, $path)
163163 public function addPsr4Map (array $ psr4Map )
164164 {
165165 if ($ this ->psr4Map ) {
166- $ this ->psr4Map = array_merge ($ this ->psr4Map , $ psr4Map );
166+ $ this ->psr4Map = \ array_merge ($ this ->psr4Map , $ psr4Map );
167167 } else {
168168 $ this ->psr4Map = $ psr4Map ;
169169 }
@@ -207,7 +207,7 @@ public function setClassMap(array $classMap)
207207 public function addClassMap (array $ classMap )
208208 {
209209 if ($ this ->classMap ) {
210- $ this ->classMap = array_merge ($ this ->classMap , $ classMap );
210+ $ this ->classMap = \ array_merge ($ this ->classMap , $ classMap );
211211 } else {
212212 $ this ->classMap = $ classMap ;
213213 }
@@ -219,15 +219,15 @@ public function addClassMap(array $classMap)
219219 */
220220 public function register ($ prepend = false )
221221 {
222- spl_autoload_register (array ($ this , 'loadClass ' ), true , $ prepend );
222+ \ spl_autoload_register (array ($ this , 'loadClass ' ), true , $ prepend );
223223 }
224224
225225 /**
226226 * Un-registers this instance as an autoloader.
227227 */
228228 public function unRegister ()
229229 {
230- spl_autoload_unregister (array ($ this , 'loadClass ' ));
230+ \ spl_autoload_unregister (array ($ this , 'loadClass ' ));
231231 }
232232
233233 /**
@@ -255,7 +255,7 @@ public function findFile($class)
255255 {
256256 // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
257257 if ('\\' === $ class [0 ]) {
258- $ class = (string )substr ($ class , 1 );
258+ $ class = (string )\ substr ($ class , 1 );
259259 }
260260
261261 // class map lookup
@@ -276,25 +276,25 @@ public function findFile($class)
276276 private function findFileWithExtension ($ class , $ ext )
277277 {
278278 // PSR-4 lookup
279- $ logicalPathPsr4 = str_replace ('\\' , DIRECTORY_SEPARATOR , $ class ) . $ ext ;
279+ $ logicalPathPsr4 = \ str_replace ('\\' , DIRECTORY_SEPARATOR , $ class ) . $ ext ;
280280
281281 // PSR-4
282282 foreach ($ this ->psr4Map as $ prefix => $ dir ) {
283- if (0 === strpos ($ class , $ prefix )) {
283+ if (0 === \ strpos ($ class , $ prefix )) {
284284 $ length = \strlen ($ prefix );
285285
286- if (file_exists ($ file = $ dir . DIRECTORY_SEPARATOR . substr ($ logicalPathPsr4 , $ length ))) {
286+ if (\ file_exists ($ file = $ dir . DIRECTORY_SEPARATOR . substr ($ logicalPathPsr4 , $ length ))) {
287287 return $ file ;
288288 }
289289 }
290290 }
291291
292292 // PEAR-like class name
293- $ logicalPathPsr0 = str_replace ('_ ' , DIRECTORY_SEPARATOR , $ class ) . $ ext ;
293+ $ logicalPathPsr0 = \ str_replace ('_ ' , DIRECTORY_SEPARATOR , $ class ) . $ ext ;
294294
295295 foreach ($ this ->psr0Map as $ prefix => $ dir ) {
296- if (0 === strpos ($ class , $ prefix )) {
297- if (file_exists ($ file = $ dir . DIRECTORY_SEPARATOR . $ logicalPathPsr0 )) {
296+ if (0 === \ strpos ($ class , $ prefix )) {
297+ if (\ file_exists ($ file = $ dir . DIRECTORY_SEPARATOR . $ logicalPathPsr0 )) {
298298 return $ file ;
299299 }
300300 }
0 commit comments