@@ -28,7 +28,7 @@ class RobotLoader
28
28
public $ acceptFiles = '*.php, *.php5 ' ;
29
29
30
30
/** @var bool @deprecated */
31
- public $ autoRebuild = TRUE ;
31
+ public $ autoRebuild = true ;
32
32
33
33
/** @var array */
34
34
private $ scanPaths = [];
@@ -37,7 +37,7 @@ class RobotLoader
37
37
private $ classes = [];
38
38
39
39
/** @var bool */
40
- private $ refreshed = FALSE ;
40
+ private $ refreshed = false ;
41
41
42
42
/** @var array of missing classes in this request */
43
43
private $ missing = [];
@@ -59,10 +59,10 @@ public function __construct()
59
59
* @param bool prepend autoloader?
60
60
* @return static
61
61
*/
62
- public function register ($ prepend = FALSE )
62
+ public function register ($ prepend = false )
63
63
{
64
64
$ this ->classes = $ this ->getCache ()->load ($ this ->getKey (), [$ this , 'rebuildCallback ' ]);
65
- spl_autoload_register ([$ this , 'tryLoad ' ], TRUE , (bool ) $ prepend );
65
+ spl_autoload_register ([$ this , 'tryLoad ' ], true , (bool ) $ prepend );
66
66
return $ this ;
67
67
}
68
68
@@ -105,7 +105,7 @@ public function tryLoad($type)
105
105
}
106
106
call_user_func (function ($ file ) { require $ file ; }, $ this ->classes [$ type ]['file ' ]);
107
107
} else {
108
- $ this ->missing [$ type ] = TRUE ;
108
+ $ this ->missing [$ type ] = true ;
109
109
}
110
110
}
111
111
@@ -156,7 +156,7 @@ public function rebuild()
156
156
*/
157
157
public function rebuildCallback ()
158
158
{
159
- $ this ->refreshed = TRUE ; // prevents calling rebuild() or updateFile() in tryLoad()
159
+ $ this ->refreshed = true ; // prevents calling rebuild() or updateFile() in tryLoad()
160
160
$ files = $ missing = [];
161
161
foreach ($ this ->classes as $ class => $ info ) {
162
162
if (is_array ($ info )) {
@@ -207,7 +207,7 @@ private function createFileIterator($dir)
207
207
$ disallow = [];
208
208
foreach ($ ignoreDirs as $ item ) {
209
209
if ($ item = realpath ($ item )) {
210
- $ disallow [$ item ] = TRUE ;
210
+ $ disallow [$ item ] = true ;
211
211
}
212
212
}
213
213
@@ -222,7 +222,7 @@ private function createFileIterator($dir)
222
222
if (is_file ("$ path/netterobots.txt " )) {
223
223
foreach (file ("$ path/netterobots.txt " ) as $ s ) {
224
224
if (preg_match ('#^(?:disallow \\s*:)? \\s*( \\S+)#i ' , $ s , $ matches )) {
225
- $ disallow [$ path . str_replace ('/ ' , DIRECTORY_SEPARATOR , rtrim ('/ ' . ltrim ($ matches [1 ], '/ ' ), '/ ' ))] = TRUE ;
225
+ $ disallow [$ path . str_replace ('/ ' , DIRECTORY_SEPARATOR , rtrim ('/ ' . ltrim ($ matches [1 ], '/ ' ), '/ ' ))] = true ;
226
226
}
227
227
}
228
228
}
@@ -268,7 +268,7 @@ private function updateFile($file)
268
268
*/
269
269
private function scanPhp ($ code )
270
270
{
271
- $ expected = FALSE ;
271
+ $ expected = false ;
272
272
$ namespace = '' ;
273
273
$ level = $ minLevel = 0 ;
274
274
$ classes = [];
@@ -323,7 +323,7 @@ private function scanPhp($code)
323
323
$ minLevel = $ token === '{ ' ? 1 : 0 ;
324
324
}
325
325
326
- $ expected = NULL ;
326
+ $ expected = null ;
327
327
}
328
328
329
329
if ($ token === '{ ' ) {
@@ -343,7 +343,7 @@ private function scanPhp($code)
343
343
* Sets auto-refresh mode.
344
344
* @return static
345
345
*/
346
- public function setAutoRefresh ($ on = TRUE )
346
+ public function setAutoRefresh ($ on = true )
347
347
{
348
348
$ this ->autoRebuild = (bool ) $ on ;
349
349
return $ this ;
0 commit comments