Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dominikzogg opened this issue Jun 8, 2020 · 4 comments

Comments

@dominikzogg
Copy link

dominikzogg commented Jun 8, 2020

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

@mergeable
Copy link

mergeable bot commented Jun 8, 2020

This bug report is missing a link to reproduction on phpstan.org.
It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

@dominikzogg
Copy link
Author

@ondrejmirtes thank you

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants