-
-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Description
Version: 4.0.6
Bug Description
When I use a trait method in a class by use as, the trait will use the full name.
Steps To Reproduce
- The origin PHP file
d.php
<?php
use A\B\C
class D
{
use C {
C::abc as acd;
}
}- Use Phpfile to parse the PHP file and print it
<?php
$php = PhpFile::fromCode(file_get_contents('d.php'));
(new PsrPrinter())->printFile($php);- output:
<?php
use A\B\C
class D
{
use C {
\A\B\C::abc as acd;
}
}Expected Behavior
<?php
use A\B\C
class D
{
use C {
C::abc as acd;
}
}Possible Solution
... Only if you have suggestions on a fix for the bug
Metadata
Metadata
Assignees
Labels
No labels