diff --git a/system/Helpers/filesystem_helper.php b/system/Helpers/filesystem_helper.php index d5f2d974e4ad..6acf6f38f846 100644 --- a/system/Helpers/filesystem_helper.php +++ b/system/Helpers/filesystem_helper.php @@ -96,7 +96,7 @@ function directory_mirror(string $originDir, string $targetDir, bool $overwrite if (! is_dir($target)) { mkdir($target, 0755); } - } elseif (! is_file($target) || ($overwrite && is_file($target))) { + } elseif ($overwrite || ! is_file($target)) { copy($origin, $target); } } diff --git a/utils/phpstan-baseline/booleanAnd.rightAlwaysTrue.neon b/utils/phpstan-baseline/booleanAnd.rightAlwaysTrue.neon deleted file mode 100644 index 0a05a1a708cc..000000000000 --- a/utils/phpstan-baseline/booleanAnd.rightAlwaysTrue.neon +++ /dev/null @@ -1,8 +0,0 @@ -# total 1 error - -parameters: - ignoreErrors: - - - message: '#^Right side of && is always true\.$#' - count: 1 - path: ../../system/Helpers/filesystem_helper.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index feab1b53df83..308117dcd44c 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,7 +1,6 @@ includes: - argument.type.neon - assign.propertyType.neon - - booleanAnd.rightAlwaysTrue.neon - codeigniter.cacheHandlerInstance.neon - codeigniter.configArgumentInstanceof.neon - codeigniter.frameworkExceptionInstance.neon