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 AnalyserIntegrationTest->runAnalyse() #2960

Merged
merged 1 commit into from Mar 16, 2024

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Mar 8, 2024

drive by cleanup, while looking into implications of phpstan/phpstan#10693

@@ -1307,13 +1307,11 @@ public function testBug10538(): void
private function runAnalyse(string $file, ?array $allAnalysedFiles = null): array
{
$file = $this->getFileHelper()->normalizePath($file);
/** @var Analyser $analyser */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

inline @var is no longer necessary. even PHPStorm learnt to autocompletes it in the meantime

$errors = $analyser->analyse([$file], null, null, true, $allAnalysedFiles)->getErrors();
foreach ($errors as $error) {
$this->assertSame($fileHelper->normalizePath($file), $error->getFilePath());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the path was already normalized in line 1309

@staabm staabm marked this pull request as ready for review March 8, 2024 10:21
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 6ad6fc9 into phpstan:1.10.x Mar 16, 2024
226 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@staabm staabm deleted the getfile branch March 16, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants