Skip to content

Commit dc61477

Browse files
committed
Updated some MD and code review recommendations
1 parent 5fc1ea5 commit dc61477

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public function __construct(array $excludePatterns = [], $generationDirectory =
3939
$this->generationDirectory = $generationDirectory;
4040
}
4141

42+
/**
43+
* Retrieves the fully qualified path for var/generation.
44+
*
45+
* @return string
46+
*/
47+
4248
public function getGenerationDirectory()
4349
{
4450
if ($this->generationDirectory === null) {

setup/src/Magento/Setup/Module/Di/Code/Reader/FileClassScanner.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public function getFileContents()
6666
* Extracts the fully qualified class name from a file. It only searches for the first match and stops looking
6767
* as soon as it enters the class definition itself.
6868
*
69+
* Warnings are suppressed for this method due to a micro-optimization that only really shows up when this logic
70+
* is called several millions of times, which can happen quite easily with even moderately sized codebases.
71+
*
6972
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
7073
* @SuppressWarnings(PHPMD.NPathComplexity)
7174
* @return array

0 commit comments

Comments
 (0)