8000 minor #45927 [VarExporter] Fix syntax that makes psalm crash (nicolas… · symfony/symfony@275448e · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 275448e

Browse files
minor #45927 [VarExporter] Fix syntax that makes psalm crash (nicolas-grekas)
This PR was merged into the 6.1 branch. Discussion ---------- [VarExporter] Fix syntax that makes psalm crash | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Should make running psalm possible again. /cc `@orklah` FYI, running this code (before the change proposed her) with dev-master crashes: `plasm --set-baseline=.github/psalm/psalm.baseline.xml --no-progress src/Symfony/Component/VarExporter/` Commits ------- 1f592ae [VarExporter] Fix syntax that makes psalm crash
2 parents b881a7e + 1f592ae commit 275448e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/VarExporter/Internal/Registry.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ public static function p($class)
5959
public static function f($class)
6060
{
6161
$reflector = self::$reflectors[$class] ?? self::getClassReflector($class, true, false);
62+
self::$factories[$class] = $reflector->newInstanceWithoutConstructor(...);
6263

63-
return self::$factories[$class] = $reflector->newInstanceWithoutConstructor(...);
64+
return self::$factories[$class];
6465
}
6566

6667
public static function getClassReflector($class, $instantiableWithoutConstructor = false, $cloneable = null)

0 commit comments

Comments
 (0)
0