Skip to content

unrecognized node type PhpParser\Node\Scalar\MagicConst\File __FILE__, __LINE__ #3405

@dominikzogg

Description

@dominikzogg

Bug report

Since the last update my project failes with the following complain.

Code snippet that reproduces the problem

https://github.com/chubbyphp/chubbyphp-framework/blob/master/src/ErrorHandler.php#L24

public static function handle(
        int $severity,
        string $message,
        string $file = __FILE__,
        int $line = __LINE__
    ): bool {
        if (!(error_reporting() & $severity)) {
            return false;
        }

        throw new \ErrorException($message, 0, $severity, $file, $line);
    }

https://phpstan.org/r/91164a25-8d76-4ca0-8932-ba57bf574362

Expected output

No error or at least an information what's wrong there, not an internal error of phpstan

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