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

[CodeQuality] Skip unused static methods in LocallyCalledStaticMethodToNonStaticRector, as should be handled by another rule #6731

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

TomasVotruba
Copy link
Member

No description provided.

…ToNonStaticRector, as should be handled by another rule
@TomasVotruba TomasVotruba enabled auto-merge (squash) February 11, 2025 14:08
@TomasVotruba TomasVotruba merged commit 91df614 into main Feb 11, 2025
44 checks passed
@TomasVotruba TomasVotruba deleted the tv-skip-non-static branch February 11, 2025 14:09
{
public static function run()
{
$result = self::anotherStatic();
Copy link
Member

Choose a reason for hiding this comment

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

the self::anotherStatic() one should be processed, as it called, that mean it is used, the verification seems on current method over the caller one.

I will check on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

It should not, as this method is static

Copy link
Member

Choose a reason for hiding this comment

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

ok, it skipped due to run() method is static, so it seems nothing to do with commented code, I will check more in case of regression of the patch, since current class name call seems only on ['self', 'static'], which current class name for ClassName::execute() is not included.

Copy link
Member

Choose a reason for hiding this comment

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

I create new PR for actual fixture for never called, with non-static method run()

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.

2 participants