@@ -131,7 +131,7 @@ public static function inline($classes, $cache, array $excluded)
131
131
}
132
132
133
133
// cache the core classes
134
- $ cacheDir = dirname ($ cache );
134
+ $ cacheDir = \ dirname ($ cache );
135
135
if (!is_dir ($ cacheDir ) && !@mkdir ($ cacheDir , 0777 , true ) && !is_dir ($ cacheDir )) {
136
136
throw new \RuntimeException (sprintf ('Class Collection Loader was not able to create directory "%s" ' , $ cacheDir ));
137
137
}
@@ -169,8 +169,8 @@ public static function inline($classes, $cache, array $excluded)
169
169
if (1 >= $ i ) {
170
170
$ file = var_export (implode ('/ ' , $ file ), true );
171
171
} else {
172
- $ file = array_slice ($ file , $ i );
173
- $ file = str_repeat ('../ ' , count ($ cacheDir ) - $ i ).implode ('/ ' , $ file );
172
+ $ file = \ array_slice ($ file , $ i );
173
+ $ file = str_repeat ('../ ' , \ count ($ cacheDir ) - $ i ).implode ('/ ' , $ file );
174
174
$ file = '__DIR__. ' .var_export ('/ ' .$ file , true );
175
175
}
176
176
@@ -203,7 +203,7 @@ public static function inline($classes, $cache, array $excluded)
203
203
*/
204
204
public static function fixNamespaceDeclarations ($ source )
205
205
{
206
- if (!function_exists ('token_get_all ' ) || !self ::$ useTokenizer ) {
206
+ if (!\ function_exists ('token_get_all ' ) || !self ::$ useTokenizer ) {
207
207
if (preg_match ('/(^|\s)namespace(.*?)\s*;/ ' , $ source )) {
208
208
$ source = preg_replace ('/(^|\s)namespace(.*?)\s*;/ ' , "1ドルnamespace2ドル \n{ " , $ source )."} \n" ;
209
209
}
@@ -220,7 +220,7 @@ public static function fixNamespaceDeclarations($source)
220
220
$ token = $ tokens [$ i ];
221
221
if (!isset ($ token [1 ]) || 'b" ' === $ token ) {
222
222
$ rawChunk .= $ token ;
223
- } elseif (in_array ($ token [0 ], array (T_COMMENT , T_DOC_COMMENT ))) {
223
+ } elseif (\ in_array ($ token [0 ], array (T_COMMENT , T_DOC_COMMENT ))) {
224
224
// strip comments
225
225
continue ;
226
226
} elseif (T_NAMESPACE === $ token [0 ]) {
@@ -230,7 +230,7 @@ public static function fixNamespaceDeclarations($source)
230
230
$ rawChunk .= $ token [1 ];
231
231
232
232
// namespace name and whitespaces
233
- while (isset ($ tokens [++$ i ][1 ]) && in_array ($ tokens [$ i ][0 ], array (T_WHITESPACE , T_NS_SEPARATOR , T_STRING ))) {
233
+ while (isset ($ tokens [++$ i ][1 ]) && \ in_array ($ tokens [$ i ][0 ], array (T_WHITESPACE , T_NS_SEPARATOR , T_STRING ))) {
234
234
$ rawChunk .= $ tokens [$ i ][1 ];
235
235
}
236
236
if ('{ ' === $ tokens [$ i ]) {
@@ -305,7 +305,7 @@ private static function compressCode($code)
305
305
*/
306
306
private static function writeCacheFile ($ file , $ content )
307
307
{
308
- $ dir = dirname ($ file );
308
+ $ dir = \ dirname ($ file );
309
309
if (!is_writable ($ dir )) {
310
310
throw new \RuntimeException (sprintf ('Cache directory "%s" is not writable. ' , $ dir ));
311
311
}
0 commit comments