phpfmt_stable
phpfmt_stable copied to clipboard
Method visibility removed when using 'insteadof'
all method keywords (abstract, public, static, etc) are removed using psr-2 formatting whenever a trait declaration block exists.
eg
class A
{
use TraitA, TraitB {
TraitB::get insteadof TraitA;
}
final public static function test()
{
return 'class A';
}
}
after formatting, it becomes
class A
{
use TraitA, TraitB {
TraitB::get insteadof TraitA;
}
function test()
{
return 'hello from class A';
}
}
This also happens with aliases (TraitA::method as methodA).