phpsa icon indicating copy to clipboard operation
phpsa copied to clipboard

Trait renames

Open ddmler opened this issue 9 years ago • 2 comments

Notice: Static method defaultMetadata() does not exist in self scope in ./src/Analyzer/Pass/Expression/ArrayShortDefinition.php on 56 [undefined-scall]

So something is not right with trait static methods or the self scope existence check.

ddmler avatar Oct 12 '16 16:10 ddmler

I just figured out that this was a trait adaptation with rename. So that's what is missing here.

ddmler avatar Oct 12 '16 16:10 ddmler

This is caused becase

https://github.com/ovr/phpsa/blob/9dffcdc59c58f32f0577dd50c07c71bb91053362/src/Analyzer/Pass/Expression/ArrayShortDefinition.php#L16

Supported:

use DefaultMetadataPassTrait {
    getMetadata as defaultMetadata;
}

Unsupported:

use DefaultMetadataPassTrait {
    DefaultMetadataPassTrait::getMetadata as defaultMetadata;
}

ovr avatar Oct 14 '16 12:10 ovr