mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-15 15:42:22 +00:00
[Core] Early assign $smartFileInfo->getPathname() to variable for RemovedAndAddedFilesCollector::isFileRemoved() (#256)
* [Core] Early assign $smartFileInfo->getPathname() to variable for RemovedAndAddedFilesCollector::isFileRemoved() * [ci-review] Rector Rectify Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
b62161e4cb
commit
d0e6a3bda6
|
@ -36,8 +36,13 @@ final class RemovedAndAddedFilesCollector
|
|||
|
||||
public function isFileRemoved(SmartFileInfo $smartFileInfo): bool
|
||||
{
|
||||
if ($this->removedFileInfos === []) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$pathname = $smartFileInfo->getPathname();
|
||||
foreach ($this->removedFileInfos as $removedFileInfo) {
|
||||
if ($removedFileInfo->getPathname() !== $smartFileInfo->getPathname()) {
|
||||
if ($removedFileInfo->getPathname() !== $pathname) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user