coding-standard
coding-standard copied to clipboard
ReferenceUsedNamesOnly allows partial uses in annotation even when denied
Given this config
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowPartialUses" value="false"/>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
And this analysed file
<?php
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @Gedmo\SoftDeleteable
*/
class SomeEntity {}
new Gedmo\SoftDeleteable();
I'm getting error only on line 10 (new), not on line 6 (annotation).
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
10 | ERROR | Partial use statements are not allowed, but referencing Gedmo\SoftDeleteable found.
| | (SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.PartialUse)
-----------------------------------------------------------------------------------------------------------