Skip to content

Commit 080ba67

Browse files
committed
refactor: fix function.alreadyNarrowedType errors
1 parent bd60f50 commit 080ba67

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

system/HTTP/Files/FileCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ protected function getValueDotNotationSyntax(array $index, array $value)
253253
{
254254
$currentIndex = array_shift($index);
255255

256-
if (isset($currentIndex) && is_array($index) && $index !== [] && array_key_exists($currentIndex, $value) && is_array($value[$currentIndex])) {
256+
if (isset($currentIndex) && $index !== [] && array_key_exists($currentIndex, $value) && is_array($value[$currentIndex])) {
257257
return $this->getValueDotNotationSyntax($index, $value[$currentIndex]);
258258
}
259259

system/Test/DOMParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ protected function doXPath(?string $search, string $element, array $paths = [])
233233

234234
// $paths might contain a number of different
235235
// ready to go xpath portions to tack on.
236-
if ($paths !== [] && is_array($paths)) {
236+
if ($paths !== []) {
237237
foreach ($paths as $extra) {
238238
$path .= $extra;
239239
}

utils/phpstan-baseline/function.alreadyNarrowedType.neon

Lines changed: 0 additions & 13 deletions
This file was deleted.

utils/phpstan-baseline/loader.neon

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 3760 errors
1+
# total 3758 errors
22
includes:
33
- argument.type.neon
44
- assign.propertyType.neon
@@ -11,7 +11,6 @@ includes:
1111
- deadCode.unreachable.neon
1212
- empty.notAllowed.neon
1313
- empty.property.neon
14-
- function.alreadyNarrowedType.neon
1514
- generator.valueType.neon
1615
- isset.property.neon
1716
- method.alreadyNarrowedType.neon

0 commit comments

Comments
 (0)