Skip to content

Call to an unknown static method in class_exists() block #308

@dmromanov

Description

@dmromanov

Bug

If you analyze the following code with PHPStan (class '\Cake\Codeception\Console\Installer' does not exist):

if (class_exists('\Cake\Codeception\Console\Installer')) {
    \Cake\Codeception\Console\Installer::customizeCodeceptionBinary($event);
}

It will report the following error.

Call to static method customizeCodeceptionBinary() on an unknown class Cake\Codeception\Console\Installer.

Expected

Call to an unknown static method and class_exists() should not throw a violation if the call is wrapped with class_exists() .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions