Skip to content

Commit 73149b9

Browse files
committed
coding style: TRUE/FALSE/NULL -> true/false/null
1 parent 74e467e commit 73149b9

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/RobotLoader/RobotLoader.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class RobotLoader
2828
public $acceptFiles = '*.php, *.php5';
2929

3030
/** @var bool @deprecated */
31-
public $autoRebuild = TRUE;
31+
public $autoRebuild = true;
3232

3333
/** @var array */
3434
private $scanPaths = [];
@@ -37,7 +37,7 @@ class RobotLoader
3737
private $classes = [];
3838

3939
/** @var bool */
40-
private $refreshed = FALSE;
40+
private $refreshed = false;
4141

4242
/** @var array of missing classes in this request */
4343
private $missing = [];
@@ -59,10 +59,10 @@ public function __construct()
5959
* @param bool prepend autoloader?
6060
* @return static
6161
*/
62-
public function register($prepend = FALSE)
62+
public function register($prepend = false)
6363
{
6464
$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);
6666
return $this;
6767
}
6868

@@ -105,7 +105,7 @@ public function tryLoad($type)
105105
}
106106
call_user_func(function ($file) { require $file; }, $this->classes[$type]['file']);
107107
} else {
108-
$this->missing[$type] = TRUE;
108+
$this->missing[$type] = true;
109109
}
110110
}
111111

@@ -156,7 +156,7 @@ public function rebuild()
156156
*/
157157
public function rebuildCallback()
158158
{
159-
$this->refreshed = TRUE; // prevents calling rebuild() or updateFile() in tryLoad()
159+
$this->refreshed = true; // prevents calling rebuild() or updateFile() in tryLoad()
160160
$files = $missing = [];
161161
foreach ($this->classes as $class => $info) {
162162
if (is_array($info)) {
@@ -207,7 +207,7 @@ private function createFileIterator($dir)
207207
$disallow = [];
208208
foreach ($ignoreDirs as $item) {
209209
if ($item = realpath($item)) {
210-
$disallow[$item] = TRUE;
210+
$disallow[$item] = true;
211211
}
212212
}
213213

@@ -222,7 +222,7 @@ private function createFileIterator($dir)
222222
if (is_file("$path/netterobots.txt")) {
223223
foreach (file("$path/netterobots.txt") as $s) {
224224
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;
226226
}
227227
}
228228
}
@@ -268,7 +268,7 @@ private function updateFile($file)
268268
*/
269269
private function scanPhp($code)
270270
{
271-
$expected = FALSE;
271+
$expected = false;
272272
$namespace = '';
273273
$level = $minLevel = 0;
274274
$classes = [];
@@ -323,7 +323,7 @@ private function scanPhp($code)
323323
$minLevel = $token === '{' ? 1 : 0;
324324
}
325325

326-
$expected = NULL;
326+
$expected = null;
327327
}
328328

329329
if ($token === '{') {
@@ -343,7 +343,7 @@ private function scanPhp($code)
343343
* Sets auto-refresh mode.
344344
* @return static
345345
*/
346-
public function setAutoRefresh($on = TRUE)
346+
public function setAutoRefresh($on = true)
347347
{
348348
$this->autoRebuild = (bool) $on;
349349
return $this;

tests/Loaders/files/conditional.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
if (FALSE) {
3+
if (false) {
44
class ConditionalClass
55
{
66
}

0 commit comments

Comments
 (0)