Skip to content

[TASK] Add PHPStan rules from Rector Type Perfect #939

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

Merged
merged 1 commit into from
Feb 16, 2025
Merged

Conversation

oliverklee
Copy link
Collaborator

This is an opiniated set of PHPStan rules to make code more explicit and intuitive to read.

https://github.com/rectorphp/type-perfect

The new rules show some parts where we could improve our code, which have now been added to the PHPStan baseline.

This is an opiniated set of PHPStan rules to make code more
explicit and intuitive to read.

https://github.com/rectorphp/type-perfect

The new rules show some parts where we could improve our code,
which have now been added to the PHPStan baseline.
@coveralls
Copy link

Coverage Status

coverage: 50.747%. remained the same
when pulling 3f352f8 on feature/type-perfect
into 3e9bc30 on main.

Copy link
Collaborator

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

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

Looks good and should hopefully be helpful. There's a weirdness in one of the baseline messages, though that can be resolved later.

path: ../src/Rule/Rule.php

-
message: '#^Parameters should have "int\|int" types as the only types passed to this method$#'
Copy link
Collaborator

Choose a reason for hiding this comment

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

int|int?!?

@JakeQZ JakeQZ merged commit 0094c4f into main Feb 16, 2025
21 checks passed
@JakeQZ JakeQZ deleted the feature/type-perfect branch February 16, 2025 11:14
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