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

[1.x] Add identifiers to rule builders #25

Merged
merged 4 commits into from
Jun 18, 2024
Merged

Conversation

RobertBoes
Copy link
Member

@RobertBoes RobertBoes commented Jun 18, 2024

Adds identifiers to all rules

These identifiers can then be used to ignore errors. Currently you'd need to use @phpstan-ignore-next-line, this will not run checks at all on this line. With identifiers we can exclude a certain rule, or rulesets. For example to ignore debug statements you can use the following:

class Dumper
{
	public function dd()
	{
		/** @phpstan-ignore hihaho.debug.noDebugInApp */
		dd($this->value);
	}
}

See: https://phpstan.org/user-guide/ignoring-errors

@RobertBoes RobertBoes self-assigned this Jun 18, 2024
@SanderMuller SanderMuller merged commit c0f4041 into main Jun 18, 2024
10 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.

3 participants