Skip to content

Commit 9382536

Browse files
minor #49341 [Filesystem] Remove always true condition (alamirault)
This PR was merged into the 6.3 branch. Discussion ---------- [Filesystem] Remove always true condition | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> `$mode` is type hinted `int $mode`, so this condition is always true. Commits ------- d2cf15d1ff [Filesystem] Remove always true condition
2 parents d97ab54 + 7f25351 commit 9382536

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private static function doRemove(array $files, bool $isRecursive): void
218218
public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool $recursive = false)
219219
{
220220
foreach ($this->toIterable($files) as $file) {
221-
if (\is_int($mode) && !self::box('chmod', $file, $mode & ~$umask)) {
221+
if (!self::box('chmod', $file, $mode & ~$umask)) {
222222
throw new IOException(sprintf('Failed to chmod file "%s": ', $file).self::$lastError, 0, null, $file);
223223
}
224224
if ($recursive && is_dir($file) && !is_link($file)) {

0 commit comments

Comments
 (0)