Skip to content

Commit 96f4190

Browse files
committed
fix cs
1 parent 8c702de commit 96f4190

20 files changed

+37
-20
lines changed

src/AnalyzeComments/Analyzer/AnalyzeFileTask.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
use SavinMikhail\CommentsDensity\AnalyzeComments\Config\DTO\ConfigDTO;
1111
use SavinMikhail\CommentsDensity\AnalyzeComments\MissingDocblock\MissingDocBlockAnalyzer;
1212
use SplFileInfo;
13-
use Symfony\Component\Console\Output\OutputInterface;
1413
use Symfony\Contracts\Cache\CacheInterface;
14+
1515
use function array_merge;
1616
use function count;
1717
use function file;
1818
use function file_get_contents;
1919
use function in_array;
2020
use function is_array;
2121
use function token_get_all;
22+
2223
use const T_COMMENT;
2324
use const T_DOC_COMMENT;
2425

src/AnalyzeComments/Analyzer/Analyzer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer;
66

7+
use Psr\Cache\InvalidArgumentException;
78
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentDTO;
89
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentStatisticsDTO;
910
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\Report;
@@ -14,8 +15,8 @@
1415
use SavinMikhail\CommentsDensity\AnalyzeComments\MissingDocblock\MissingDocBlockAnalyzer;
1516
use SavinMikhail\CommentsDensity\Baseline\Storage\BaselineStorageInterface;
1617
use SplFileInfo;
17-
use Symfony\Component\Console\Output\OutputInterface;
1818
use Symfony\Contracts\Cache\CacheInterface;
19+
1920
use function array_push;
2021

2122
final class Analyzer
@@ -35,7 +36,7 @@ public function __construct(
3536

3637
/**
3738
* @param SplFileInfo[] $files
38-
* @throws CommentsDensityException
39+
* @throws CommentsDensityException|InvalidArgumentException
3940
*/
4041
public function analyze(iterable $files): Report
4142
{

src/AnalyzeComments/Analyzer/AnalyzerFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use SavinMikhail\CommentsDensity\AnalyzeComments\MissingDocblock\MissingDocBlockAnalyzer;
1414
use SavinMikhail\CommentsDensity\Baseline\Storage\BaselineStorageInterface;
1515
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
16-
use Symfony\Component\Console\Output\OutputInterface;
1716

1817
final readonly class AnalyzerFactory
1918
{

src/AnalyzeComments/Analyzer/CommentStatisticsAggregator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
use SavinMikhail\CommentsDensity\AnalyzeComments\Config\DTO\ConfigDTO;
1111
use SavinMikhail\CommentsDensity\AnalyzeComments\Exception\CommentsDensityException;
1212
use SavinMikhail\CommentsDensity\AnalyzeComments\MissingDocblock\MissingDocBlockAnalyzer;
13+
1314
use function substr_count;
15+
1416
use const PHP_EOL;
1517

1618
final readonly class CommentStatisticsAggregator

src/AnalyzeComments/Commands/AnalyzeCommentCommand.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
use RecursiveIteratorIterator;
99
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\AnalyzerFactory;
1010
use SavinMikhail\CommentsDensity\AnalyzeComments\Config\ConfigLoader;
11-
use SavinMikhail\CommentsDensity\AnalyzeComments\Config\DTO\ConfigDTO;
12-
use SavinMikhail\CommentsDensity\AnalyzeComments\Exception\CommentsDensityException;
1311
use SavinMikhail\CommentsDensity\AnalyzeComments\Formatter\ConsoleFormatter;
14-
use SavinMikhail\CommentsDensity\AnalyzeComments\Formatter\FormatterFactory;
1512
use SavinMikhail\CommentsDensity\AnalyzeComments\Formatter\HtmlFormatter;
1613
use SavinMikhail\CommentsDensity\Baseline\Storage\TreePhpBaselineStorage;
1714
use SplFileInfo;
@@ -22,12 +19,11 @@
2219
final class AnalyzeCommentCommand extends Command
2320
{
2421
public function __construct(
25-
private readonly ConfigLoader $configLoader = new ConfigLoader(),
22+
private readonly ConfigLoader $configLoader = new ConfigLoader(),
2623
private readonly TreePhpBaselineStorage $storage = new TreePhpBaselineStorage(),
27-
private readonly AnalyzerFactory $analyzerFactory = new AnalyzerFactory(),
28-
?string $name = null,
29-
)
30-
{
24+
private readonly AnalyzerFactory $analyzerFactory = new AnalyzerFactory(),
25+
?string $name = null,
26+
) {
3127
parent::__construct($name);
3228
}
3329

src/AnalyzeComments/Config/ConfigLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66

77
use SavinMikhail\CommentsDensity\AnalyzeComments\Config\DTO\ConfigDTO;
88
use SavinMikhail\CommentsDensity\AnalyzeComments\Exception\CommentsDensityException;
9+
910
use function defined;
1011
use function dirname;
1112
use function file_exists;
13+
1214
use const DIRECTORY_SEPARATOR;
1315

1416
final readonly class ConfigLoader

src/AnalyzeComments/Formatter/ConsoleFormatter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentDTO;
99
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentStatisticsDTO;
1010
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\ComToLocDTO;
11-
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\Report;
1211
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\PerformanceMetricsDTO;
12+
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\Report;
1313
use Symfony\Component\Console\Helper\Table;
1414
use Symfony\Component\Console\Output\OutputInterface;
15+
1516
use function array_map;
1617

1718
final readonly class ConsoleFormatter implements FormatterInterface

src/AnalyzeComments/Formatter/HtmlFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
namespace SavinMikhail\CommentsDensity\AnalyzeComments\Formatter;
66

77
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\Report;
8+
89
use function file_put_contents;
910
use function htmlspecialchars;
1011
use function nl2br;
12+
1113
use const ENT_QUOTES;
1214
use const ENT_SUBSTITUTE;
1315

src/AnalyzeComments/Metrics/CDS.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CdsDTO;
1010
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentStatisticsDTO;
1111
use SavinMikhail\CommentsDensity\AnalyzeComments\Comments\CommentFactory;
12+
1213
use function in_array;
1314
use function round;
1415

src/AnalyzeComments/Metrics/ComToLoc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentStatisticsDTO;
88
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\ComToLocDTO;
9+
910
use function round;
1011

1112
final class ComToLoc

0 commit comments

Comments
 (0)