Skip fiber machinery for noop node callbacks · phpstan/phpstan-src@a9260cb · GitHub
//commit/show" data-turbo-transient="true" />
Skip to content
Search/
Sign in<br>Sign upAppearance settings
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading. Please reload this page.
phpstan
phpstan-src
Public
Notifications<br>You must be signed in to change notification settings
Fork<br>585
Star<br>397
File tree<br>Expand file treeCollapse file tree<br>Open diff view settings
Filter options
src/Analyser/Fiber
FiberNodeScopeResolver.php
Expand file treeCollapse file tree<br>Open diff view settings
Collapse file<br>src/Analyser/Fiber/FiberNodeScopeResolver.php<br>Copy file name to clipboardExpand all lines: src/Analyser/Fiber/FiberNodeScopeResolver.php<br>+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change@@ -10,6 +10,7 @@
1010use PHPStan\Analyser\GatheringNodeCallback;<br>1111use PHPStan\Analyser\MutatingScope;<br>1212use PHPStan\Analyser\NodeScopeResolver;<br>13+use PHPStan\Analyser\NoopNodeCallback;<br>1314use PHPStan\Analyser\Scope;<br>1415use PHPStan\DependencyInjection\AutowiredService;<br>1516use PHPStan\ShouldNotHappenException;
@@ -41,6 +42,12 @@ public function callNodeCallback(
4142 $nodeCallback = $nodeCallback->getInner();<br>4243 }<br>4344
45+ if ($nodeCallback instanceof NoopNodeCallback) {<br>46+ // fibers exist solely to let node callbacks ask about types,<br>47+ // a noop callback does not need one<br>48+ return;<br>49+ }<br>50+<br>4451 if (Fiber::getCurrent() !== null) {<br>4552 $nodeCallback($node, $scope->toFiberScope());<br>4653 return;
0 commit comments<br>Comments<br>0 (0)
You can’t perform that action at this time.