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

Add error identifiers #43

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

SanderMuller
Copy link
Contributor

closes #41

@@ -175,6 +175,7 @@ private function validateParam(Param $param, int $position, Expr $expr, Scope $s
$errorMessage = sprintf(self::ERROR_MESSAGE, $position + 1, $argTypeAsString);

return RuleErrorBuilder::message($errorMessage)
->identifier('typePerfect.narrowPrivateClassMethodParamType')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First tried naming like this: type_perfect.no_empty_on_object, but that results in error identifiers must match /[a-zA-Z0-9](?:[a-zA-Z0-9\.]*[a-zA-Z0-9])? so I ended up using camelCase.camelCase

@SanderMuller SanderMuller marked this pull request as ready for review September 17, 2024 08:55
Copy link
Contributor

@staabm staabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - error-identifiers are mandatory for PHPStan 2.0+

@TomasVotruba
Copy link
Member

Awesome, thank you 👍

@TomasVotruba TomasVotruba merged commit 14689aa into rectorphp:main Sep 18, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add error identifiers
3 participants