Skip to content

Commit 101192e

Browse files
committed
perf checks PostFileProcessor
1 parent 9265f92 commit 101192e

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/PostRector/Application/PostFileProcessor.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ private function getPostRectors(): array
9797

9898
$isRenamedClassEnabled = $this->renamedClassesDataCollector->getOldToNewClasses() !== [];
9999
$isNameImportingEnabled = SimpleParameterProvider::provideBoolParameter(Option::AUTO_IMPORT_NAMES);
100-
$isDocblockNameImportingEnabled = SimpleParameterProvider::provideBoolParameter(
101-
Option::AUTO_IMPORT_DOC_BLOCK_NAMES
102-
);
103100

104101
$isRemovingUnusedImportsEnabled = SimpleParameterProvider::provideBoolParameter(Option::REMOVE_UNUSED_IMPORTS);
105102

@@ -113,11 +110,11 @@ private function getPostRectors(): array
113110
// import names
114111
if ($isNameImportingEnabled) {
115112
$postRectors[] = $this->nameImportingPostRector;
116-
}
117113

118-
// import docblocks
119-
if ($isNameImportingEnabled && $isDocblockNameImportingEnabled) {
120-
$postRectors[] = $this->docblockNameImportingPostRector;
114+
// import docblocks
115+
if (SimpleParameterProvider::provideBoolParameter(Option::AUTO_IMPORT_DOC_BLOCK_NAMES)) {
116+
$postRectors[] = $this->docblockNameImportingPostRector;
117+
}
121118
}
122119

123120
$postRectors[] = $this->useAddingPostRector;

0 commit comments

Comments
 (0)