We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 445e063 commit 44a7a51Copy full SHA for 44a7a51
src/PhpGenerator/Factory.php
@@ -272,7 +272,7 @@ public function fromPropertyReflection(\ReflectionProperty $from): Property
272
273
public function fromObject(object $obj): Literal
274
{
275
- return new Literal('new ' . $obj::class . '(/* unknown */)');
+ return new Literal('new \\' . $obj::class . '(/* unknown */)');
276
}
277
278
tests/PhpGenerator/expected/ClassType.from.81.expect
@@ -1,4 +1,4 @@
1
-#[Attr(new Abc\Attr(/* unknown */))]
+#[Attr(new \Abc\Attr(/* unknown */))]
2
class Class11
3
4
final public const FOO = 10;
@@ -12,7 +12,7 @@ class Class11
12
13
14
15
- public function bar($c = new stdClass(/* unknown */))
+ public function bar($c = new \stdClass(/* unknown */))
16
17
18
0 commit comments