8000 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_met… · symfony/filesystem@2a867f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2a867f5

Browse files
SpacePossumnicolas-grekas
authored andcommitted
[CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
1 parent 5d0ab3d commit 2a867f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Filesystem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public function makePathRelative($endPath, $startPath)
404404
}
405405

406406
// Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
407-
if (count($startPathArr) === 1 && $startPathArr[0] === '') {
407+
if (1 === count($startPathArr) && '' === $startPathArr[0]) {
408408
$depth = 0;
409409
} else {
410410
$depth = count($startPathArr) - $index;
@@ -512,7 +512,7 @@ public function isAbsolutePath($file)
512512
{
513513
return strspn($file, '/\\', 0, 1)
514514
|| (strlen($file) > 3 && ctype_alpha($file[0])
515-
&& substr($file, 1, 1) === ':'
515+
&& ':' === substr($file, 1, 1)
516516
&& strspn($file, '/\\', 2, 1)
517517
)
518518
|| null !== parse_url($file, PHP_URL_SCHEME)

0 commit comments

Comments
 (0)
0