Skip to content

Commit

Permalink
remove defer
Browse files Browse the repository at this point in the history
  • Loading branch information
savinmikhail committed Jan 6, 2025
1 parent 35e4a12 commit ec56d6e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 57 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"composer/composer": "^2.8",
"composer/xdebug-handler": "^3.0.5",
"nikic/php-parser": "^5.1",
"php-defer/php-defer": "^5.0",
"savinmikhail/primitive_wrappers": "^1.2",
"symfony/cache": "^7.2",
"symfony/cache-contracts": "^3.5",
Expand Down
53 changes: 3 additions & 50 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions src/AnalyzeComments/Analyzer/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,9 @@ public function analyze(): Report
$commentStatistics = $this->statisticsAggregator->calculateCommentStatistics($comments);
$report = $this->createReport($comments, $commentStatistics, $filesAnalyzed, $totalLinesOfCode);

$config = $this->config;
defer($_, static function () use ($report, $config): void { // todo figure out how much sense it makes
foreach ($config->plugins as $plugin) {
$plugin->handle($report, $config);
}
});
foreach ($this->config->plugins as $plugin) { // todo make it async
$plugin->handle($report, $this->config);
}

return $report;
}
Expand Down

0 comments on commit ec56d6e

Please sign in to comment.