Skip to content

Commit d28561b

Browse files
authored
Update README.md (#163)
1 parent 0f70b68 commit d28561b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ function test(SerializerInterface $serializer): User {
151151
```
152152

153153
```php
154+
use PhpParser\Node;
155+
use PhpParser\Node\Expr\MethodCall;
156+
use PHPStan\Analyser\Scope;
154157
use ReflectionMethod;
155158
use ShipMonk\PHPStan\DeadCode\Graph\ClassMethodRef;
156159
use ShipMonk\PHPStan\DeadCode\Graph\ClassMethodUsage;
@@ -183,7 +186,7 @@ class DeserializationUsageProvider implements MemberUsageProvider
183186
$serializedClass = $scope->getType($secondArgument)->getConstantStrings()[0];
184187

185188
// record the method it was called from (needed for proper transitive dead code elimination)
186-
$originRef = $this->originDetector->detectOrigin($node, $scope);
189+
$originRef = $this->originDetector->detectOrigin($scope);
187190

188191
// record the hidden constructor call
189192
$constructorRef = new ClassMethodRef($serializedClass->getValue(), '__construct', false);

0 commit comments

Comments
 (0)