diff --git a/system/HTTP/Files/FileCollection.php b/system/HTTP/Files/FileCollection.php index 120652e8bd87..484b3ff74872 100644 --- a/system/HTTP/Files/FileCollection.php +++ b/system/HTTP/Files/FileCollection.php @@ -253,7 +253,7 @@ protected function getValueDotNotationSyntax(array $index, array $value) { $currentIndex = array_shift($index); - if (isset($currentIndex) && is_array($index) && $index !== [] && array_key_exists($currentIndex, $value) && is_array($value[$currentIndex])) { + if (isset($currentIndex) && $index !== [] && array_key_exists($currentIndex, $value) && is_array($value[$currentIndex])) { return $this->getValueDotNotationSyntax($index, $value[$currentIndex]); } diff --git a/system/Test/DOMParser.php b/system/Test/DOMParser.php index f46ce1d65206..d8521edfbc86 100644 --- a/system/Test/DOMParser.php +++ b/system/Test/DOMParser.php @@ -233,10 +233,8 @@ protected function doXPath(?string $search, string $element, array $paths = []) // $paths might contain a number of different // ready to go xpath portions to tack on. - if ($paths !== [] && is_array($paths)) { - foreach ($paths as $extra) { - $path .= $extra; - } + foreach ($paths as $extra) { + $path .= $extra; } if ($search !== null) { diff --git a/utils/phpstan-baseline/function.alreadyNarrowedType.neon b/utils/phpstan-baseline/function.alreadyNarrowedType.neon deleted file mode 100644 index 740fa9659412..000000000000 --- a/utils/phpstan-baseline/function.alreadyNarrowedType.neon +++ /dev/null @@ -1,13 +0,0 @@ -# total 2 errors - -parameters: - ignoreErrors: - - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' - count: 1 - path: ../../system/HTTP/Files/FileCollection.php - - - - message: '#^Call to function is_array\(\) with non\-empty\-array will always evaluate to true\.$#' - count: 1 - path: ../../system/Test/DOMParser.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 7cd42b1fec33..575c7843ba98 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 3589 errors +# total 3587 errors includes: - argument.type.neon - assign.propertyType.neon @@ -11,7 +11,6 @@ includes: - deadCode.unreachable.neon - empty.notAllowed.neon - empty.property.neon - - function.alreadyNarrowedType.neon - generator.valueType.neon - isset.property.neon - method.alreadyNarrowedType.neon