Skip to content

Commit 5214065

Browse files
Enable "native_constant_invocation" CS rule
1 parent 5ec813c commit 5214065

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Finder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ public function in($dirs)
541541
foreach ((array) $dirs as $dir) {
542542
if (is_dir($dir)) {
543543
$resolvedDirs[] = $this->normalizeDir($dir);
544-
} elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR | GLOB_NOSORT)) {
544+
} elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
545545
sort($glob);
546546
$resolvedDirs = array_merge($resolvedDirs, array_map([$this, 'normalizeDir'], $glob));
547547
} else {
@@ -658,7 +658,7 @@ private function searchInDirectory($dir)
658658
}
659659

660660
$minDepth = 0;
661-
$maxDepth = PHP_INT_MAX;
661+
$maxDepth = \PHP_INT_MAX;
662662

663663
foreach ($this->depths as $comparator) {
664664
switch ($comparator->getOperator()) {
@@ -693,7 +693,7 @@ private function searchInDirectory($dir)
693693

694694
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
695695

696-
if ($minDepth > 0 || $maxDepth < PHP_INT_MAX) {
696+
if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) {
697697
$iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
698698
}
699699

Iterator/DepthRangeFilterIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class DepthRangeFilterIterator extends FilterIterator
2525
* @param int $minDepth The min depth
2626
* @param int $maxDepth The max depth
2727
*/
28-
public function __construct(\RecursiveIteratorIterator $iterator, $minDepth = 0, $maxDepth = PHP_INT_MAX)
28+
public function __construct(\RecursiveIteratorIterator $iterator, $minDepth = 0, $maxDepth = \PHP_INT_MAX)
2929
{
3030
$this->minDepth = $minDepth;
31-
$iterator->setMaxDepth(PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
31+
$iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
3232

3333
parent::__construct($iterator);
3434
}

Tests/Iterator/DepthRangeFilterIteratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public function getAcceptData()
7575
return [
7676
[0, 0, $this->toAbsolute($lessThan1)],
7777
[0, 1, $this->toAbsolute($lessThanOrEqualTo1)],
78-
[2, PHP_INT_MAX, []],
79-
[1, PHP_INT_MAX, $this->toAbsolute($graterThanOrEqualTo1)],
78+
[2, \PHP_INT_MAX, []],
79+
[1, \PHP_INT_MAX, $this->toAbsolute($graterThanOrEqualTo1)],
8080
[1, 1, $this->toAbsolute($equalTo1)],
8181
];
8282
}

0 commit comments

Comments
 (0)