-
Notifications
You must be signed in to change notification settings - Fork 8
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
feature/ignore-interface-in-privatize-constants-command #35
base: main
Are you sure you want to change the base?
feature/ignore-interface-in-privatize-constants-command #35
Conversation
$excludedPaths, | ||
static fn (SplFileInfo $splFileInfo): bool => ! str_ends_with( | ||
$splFileInfo->getFilenameWithoutExtension(), | ||
'Interface' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about interface that do not have such suffix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, do not get your idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface should be skipped too, but the there is no "Interface" suffix:
interface NotSuffixed
{
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parse file content for this check will be ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, that's the way.
Somewhere here maybe:
foreach ($phpstanResult['files'] as $fileDetail) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done it another way. It does not cover all edge cases, but it should work for 99% of cases.
No description provided.