Skip to content

Issue with implementsInterface #150

@VincentLanglet

Description

@VincentLanglet

With the following code

foreach ($data['sniffs'] as $sniffName) {
     Assert::string($sniffName);
     Assert::classExists($sniffName);
     Assert::implementsInterface($sniffName, SniffInterface::class);

     $ruleSet->addSniff(new $sniffName());
}

I get

Call to static method Webmozart\Assert\Assert::implementsInterface() with class-string and 'TwigCsFixer\\Sniff\\SniffInterface' will always evaluate to false.

i tried to install

"phpstan/phpstan": "1.9.x-dev as 1.9.0",
"phpstan/phpstan-webmozart-assert": "1.2.x-dev as 1.3",

but it doesn't solved anything

I saw you recently work on this method @herndlm (#144), any idea what could be wrong here ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions