-
-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Milestone
Description
- PHP Depend version: 2.12.1
- PHP Version: 8.2.0
- Installation type: composer
- Operating System / Distribution & Version: Docker image webdevops/php-nginx-dev
- phpmd/phpmd 2.13.0
Current Behavior
Unexpected Token Exception for class name is thrown when using combination "readonly" and "final" or "readonly" and "abstract".
Expected Behavior
The same behavior as when you use the words separately.
Steps To Reproduce:
- Use combination of words "readonly" and "final" for declaration of class e.g. "final readonly class SmsStatusChecker" or "readonly final class SmsStatusChecker" or "abstract readonly class AbstractStringValueObject implements Stringable",...
- Run PHPMD command
Error log:
Unexpected token: readonly, line: 22, col: 7, file: /app/app/Service/SmsStatusChecker.php.
#0 /app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php(7965): PDepend\Source\Parser\UnexpectedTokenException->__construct(Object(PDepend\Source\Tokenizer\Token), Object(PDepend\Source\AST\ASTCompilationUnit))
Checks before submitting
- Be sure that there isn't already an issue about this. See: Issues list
- Be sure that there isn't already a pull request about this. See: Pull requests
- I have added every step to reproduce the bug.
- If possible I added relevant code examples.
- This issue is about 1 bug and nothing more.
- The issue has a descriptive title. For example: "Default value is not available in AST when it's an array".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels