Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Dec 17, 2022

There is already initialization early of $this->currentFileProvider->setFile($file); when call:

$parsingSystemErrors = $this->parseFileAndDecorateNodes($file);

in parseFileAndDecorateNodes() method:

private function parseFileAndDecorateNodes(File $file): array
{
$this->currentFileProvider->setFile($file);

so, next calls no longer needed as already set early.

so:

✔️ Remove 2 unused call $this->currentFileProvider->setFile($file);
✔️ Remove unused private method that only call another method, just use as is directly:

$this->fileProcessor->refactor($file, $configuration)

as it only do that now.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit e895bce into main Dec 17, 2022
@TomasVotruba TomasVotruba deleted the core-remove-repetitive-setfile branch December 17, 2022 13:40
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.

4 participants