Skip to content

PSR12.Traits.UseDeclaration does not allow comments above a USE declaration #2628

@dereuromark

Description

@dereuromark

False-positive on reporting:

class Repeater implements RepeaterInterface
{
    /**
     * This is some text
     *
     * We need the configuration ... foo bar.
     */
    use BundleConfigResolverAwareTrait;

wrongly reports

FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 27 | ERROR | The first trait import statement must be declared on
    |       | the line after the class opening brace

moved from #2624

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions