Skip to content

Commit 14b3976

Browse files
Merge branch '2.7' into 2.8
* 2.7: [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
2 parents 4bea21f + acc672f commit 14b3976

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Adapter/GnuFindAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function buildFormatSorting(Command $command, $sort)
7676
*/
7777
protected function canBeUsed()
7878
{
79-
return $this->shell->getType() === Shell::TYPE_UNIX && parent::canBeUsed();
79+
return Shell::TYPE_UNIX === $this->shell->getType() && parent::canBeUsed();
8080
}
8181

8282
/**

Expression/Regex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public static function create($expr)
6969

7070
if (
7171
($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start))
72-
|| ($start === '{' && $end === '}')
73-
|| ($start === '(' && $end === ')')
72+
|| ('{' === $start && '}' === $end)
73+
|| ('(' === $start && ')' === $end)
7474
) {
7575
return new self(substr($m[1], 1, -1), $m[2], $end);
7676
}

Tests/Iterator/SortableIteratorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public function testAccept($mode, $expected)
5858

5959
$iterator = new SortableIterator($inner, $mode);
6060

61-
if ($mode === SortableIterator::SORT_BY_ACCESSED_TIME
62-
|| $mode === SortableIterator::SORT_BY_CHANGED_TIME
63-
|| $mode === SortableIterator::SORT_BY_MODIFIED_TIME
61+
if (SortableIterator::SORT_BY_ACCESSED_TIME === $mode
62+
|| SortableIterator::SORT_BY_CHANGED_TIME === $mode
63+
|| SortableIterator::SORT_BY_MODIFIED_TIME === $mode
6464
) {
6565
if ('\\' === DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) {
6666
$this->markTestSkipped('Sorting by atime or ctime is not supported on Windows');

0 commit comments

Comments
 (0)