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

Added test-case covering property referenced via "static" keyword #66

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jun 26, 2023

Initially I added this new test-case, as I was sure when looking at the implementation that it would fail.

turns out it passes, and I don't know why. but as it works as expected lets add this test-coverage :)

'somePublicStaticProperty'
);
yield [
[__DIR__ . '/Fixture/LocallyUsedStaticPropertyViaStatic.php'],
Copy link
Contributor Author

@staabm staabm Jun 26, 2023

Choose a reason for hiding this comment

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

btw: I wondered why we separate test-classes between Fixture and Source in this repo.

it might make sense todo so in a rector package, but I think its not useful in a phpstan rule/extension package?

Copy link
Owner

Choose a reason for hiding this comment

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

You're right, it can be only /Fixture here, if a file is provided in list of files analysed by PHPStan.

@staabm staabm changed the title Added test-case covering property refernced via "static" keyword Added test-case covering property referenced via "static" keyword Jun 26, 2023
@TomasVotruba
Copy link
Owner

turns out it passes, and I don't know why. but as it works as expected lets add this test-coverage :)

Probably fortunate accident 😄 thanks for checking, test for new case is always welcomed 👏

@TomasVotruba TomasVotruba merged commit 45d3c21 into TomasVotruba:main Jun 26, 2023
8 checks passed
@staabm staabm deleted the viastatic branch June 26, 2023 19:10
This pull request was closed.
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