diff --git a/composer.json b/composer.json index 0f68669..420e285 100755 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index faf88b3..6df470c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ab0b8096e71da43f71dd6fea7598990a", + "content-hash": "4fe1fb820c0e9ab09fd6188e7df2db9e", "packages": [ { "name": "composer/ca-bundle", @@ -767,53 +767,6 @@ }, "time": "2024-07-01T20:03:41+00:00" }, - { - "name": "php-defer/php-defer", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/php-defer/php-defer.git", - "reference": "9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-defer/php-defer/zipball/9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7", - "reference": "9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.inc.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bartłomiej Krukowski", - "email": "bartlomiej@krukowski.me" - } - ], - "description": "Golang's defer statement for PHP", - "keywords": [ - "defer", - "golang" - ], - "support": { - "issues": "https://github.com/php-defer/php-defer/issues", - "source": "https://github.com/php-defer/php-defer/tree/v5.0.7" - }, - "time": "2023-09-21T16:38:54+00:00" - }, { "name": "psr/cache", "version": "3.0.0", @@ -7401,7 +7354,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -7409,7 +7362,7 @@ "ext-tokenizer": "*", "composer-plugin-api": "^2.0" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.2" }, diff --git a/src/AnalyzeComments/Analyzer/Analyzer.php b/src/AnalyzeComments/Analyzer/Analyzer.php index 71c0d79..5dcd3b2 100755 --- a/src/AnalyzeComments/Analyzer/Analyzer.php +++ b/src/AnalyzeComments/Analyzer/Analyzer.php @@ -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; }