Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
use function in_array;
use function is_array;
use function is_int;
use function is_object;
use function is_string;
use function ksort;
use function sprintf;
Expand Down Expand Up @@ -4962,10 +4963,15 @@
}
}

if ($calleeReflection !== null) {

Check failure on line 4966 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

Result of && is always false.

Check failure on line 4966 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

Undefined variable: $arg

Check failure on line 4966 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4966 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

Result of && is always false.

Check failure on line 4966 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

Undefined variable: $arg

Check failure on line 4966 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

Variable $arg in isset() always exists and is not nullable.
$scope = $scope->pushInFunctionCall($calleeReflection, $parameter);
}

// Attempt to prevent null exception at line 4974 when calling getAttritbute
if (!isset($arg) && !is_object($arg)) {

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.4)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.4)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.4)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, ubuntu-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, ubuntu-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, ubuntu-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, windows-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, windows-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, windows-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Result of && is always false.

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Undefined variable: $arg

Check failure on line 4971 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Variable $arg in isset() always exists and is not nullable.
continue;
}

$originalArg = $arg->getAttribute(ArgumentsNormalizer::ORIGINAL_ARG_ATTRIBUTE) ?? $arg;
$nodeCallback($originalArg, $scope);

Expand Down Expand Up @@ -5040,7 +5046,7 @@

$scope = $this->processImmediatelyCalledCallable($scope, $invalidateExpressions, $uses);
} elseif ($arg->value instanceof Expr\ArrowFunction) {
if (

Check failure on line 5049 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Result of && is always false.

Check failure on line 5049 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Undefined variable: $arg

Check failure on line 5049 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Variable $arg in isset() always exists and is not nullable.

Check failure on line 5049 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Result of && is always false.

Check failure on line 5049 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Undefined variable: $arg

Check failure on line 5049 in src/Analyser/NodeScopeResolver.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Variable $arg in isset() always exists and is not nullable.
$closureBindScope === null
&& $parameter instanceof ExtendedParameterReflection
&& $parameter->getClosureThisType() !== null
Expand Down
Loading