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

Take calls from plain php files into account #79

Merged
merged 6 commits into from
Jul 31, 2023

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jul 25, 2023

No description provided.

@staabm staabm marked this pull request as ready for review July 25, 2023 09:30
yield [[
__DIR__ . '/Fixture/Tests/MethodForTests.php',
__DIR__ . '/Fixture/Tests/SkipCalledInTests.php',
], [[$errorMessage, 13, RuleTips::SOLUTION_MESSAGE]]];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this test was wrong before and reporting 2 errors is correct, as the only calls are in Test-classes

@staabm
Copy link
Contributor Author

staabm commented Jul 28, 2023

ping @TomasVotruba would be great to get this false positives out of the way.

please also see the 2 other PRs

@@ -50,13 +50,10 @@ public function processNode(Node $node, Scope $scope): ?array
return null;
}

$classReflection = $scope->getClassReflection();
if (! $classReflection instanceof ClassReflection) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

before this PR, this check made collection on code which is not within class-scope early exiting.

@staabm
Copy link
Contributor Author

staabm commented Jul 31, 2023

@TomasVotruba if you could merge this one and tag a new release, we would have fixed a major source of false postives with this lib 🤘

@TomasVotruba
Copy link
Owner

TomasVotruba commented Jul 31, 2023

Let's ship this :) thank you 👏

@TomasVotruba TomasVotruba merged commit 151b74c into TomasVotruba:main Jul 31, 2023
8 checks passed
@staabm staabm deleted the plain-php branch July 31, 2023 15:08
@staabm
Copy link
Contributor Author

staabm commented Jul 31, 2023

thank you

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.

None yet

3 participants