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

[CLEANUP] Rector: Add strict return type based on returned strict expr type #581

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

ziegenberg
Copy link
Contributor

This applies the rule ReturnTypeFromStrictBoolReturnExprRector. For Details see:
https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#returntypefromstrictboolreturnexprrector

@ziegenberg
Copy link
Contributor Author

Rebased it.

@ziegenberg
Copy link
Contributor Author

Should those PHPDoc @return statements also be deleted?

@JakeQZ
Copy link
Contributor

JakeQZ commented Jun 19, 2024

Should those PHPDoc @return statements also be deleted?

I think so, if they don't provide anything more than the type hint.

Copy link
Contributor

@oliverklee oliverklee left a comment

Choose a reason for hiding this comment

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

Thanks! Yes, please let's drop those redundant @return PHPDoc annotations.

@oliverklee oliverklee changed the title [CLEANUP] rector: Add strict return type based on returned strict expr type [CLEANUP] Rector: Add strict return type based on returned strict expr type Jun 19, 2024
…r type

This applies the rule ReturnTypeFromStrictBoolReturnExprRector. For
Details see:
https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#returntypefromstrictboolreturnexprrector

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
@ziegenberg
Copy link
Contributor Author

Rebased and removed the PHPDoc annotations.

Copy link
Contributor

@oliverklee oliverklee left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! 🙏

@oliverklee oliverklee merged commit a2ac14f into MyIntervals:main Jun 19, 2024
18 checks passed
@ziegenberg ziegenberg deleted the add-type-coverage-level-6 branch June 19, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants