Skip to content

Commit c546ec0

Browse files
committed
fix cs
1 parent 0a61f6c commit c546ec0

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

src/AnalyzeComments/Analyzer/Analyzer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
final readonly class Analyzer
2020
{
2121
public function __construct(
22-
private Config $configDTO,
23-
private CommentTypeFactory $commentFactory,
24-
private MetricsFacade $metrics,
25-
private BaselineStorageInterface $baselineStorage,
26-
private CacheInterface $cache,
22+
private Config $configDTO,
23+
private CommentTypeFactory $commentFactory,
24+
private MetricsFacade $metrics,
25+
private BaselineStorageInterface $baselineStorage,
26+
private CacheInterface $cache,
2727
private CommentStatisticsAggregator $statisticsAggregator,
2828
) {}
2929

src/AnalyzeComments/Analyzer/AnalyzerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
final readonly class AnalyzerFactory
1717
{
1818
public function getAnalyzer(
19-
Config $configDto,
19+
Config $configDto,
2020
BaselineStorageInterface $baselineStorage,
2121
): Analyzer {
2222
$commentFactory = new CommentTypeFactory($configDto->getAllowedTypes());

src/AnalyzeComments/Analyzer/CommentFinder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
public function __construct(
2424
private CommentTypeFactory $commentFactory,
25-
private Config $configDTO,
26-
?Parser $parser = null,
25+
private Config $configDTO,
26+
?Parser $parser = null,
2727
) {
2828
$this->parser = $parser ?? (new ParserFactory())->createForHostVersion();
2929
}

src/AnalyzeComments/Analyzer/CommentStatisticsAggregator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
final readonly class CommentStatisticsAggregator
1818
{
1919
public function __construct(
20-
private Config $configDTO,
20+
private Config $configDTO,
2121
private CommentTypeFactory $commentFactory,
2222
) {}
2323

src/AnalyzeComments/Analyzer/FileContentExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
public function __construct(
1313
private SplFileInfo $file,
14-
private Config $configDTO,
14+
private Config $configDTO,
1515
) {}
1616

1717
public function getContent(): string
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace SavinMikhail\CommentsDensity\AnalyzeComments\Formatter\Filter;
46

57
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentDTO;
68
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\CommentStatisticsDTO;
79
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\Report;
810

11+
use function in_array;
12+
913
final readonly class ViolatingCommentsOnlyFilter
1014
{
1115
public function filter(Report $report): array
@@ -15,15 +19,14 @@ public function filter(Report $report): array
1519
static fn(CommentStatisticsDTO $commentStatisticsDTO): string => $commentStatisticsDTO->type,
1620
array_filter(
1721
$report->commentsStatistics,
18-
static fn(CommentStatisticsDTO $commentStatisticsDTO): bool => $commentStatisticsDTO->color === 'red'
19-
)
22+
static fn(CommentStatisticsDTO $commentStatisticsDTO): bool => $commentStatisticsDTO->color === 'red',
23+
),
2024
);
2125

2226
return array_filter(
2327
$report->comments,
24-
static fn(CommentDTO $commentDTO): bool =>
25-
in_array($commentDTO->commentType, $violatingTypes, true)
26-
&& $commentDTO->commentTypeColor === 'red'
28+
static fn(CommentDTO $commentDTO): bool => in_array($commentDTO->commentType, $violatingTypes, true)
29+
&& $commentDTO->commentTypeColor === 'red',
2730
);
2831
}
29-
}
32+
}

src/AnalyzeComments/Formatter/HtmlFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
namespace SavinMikhail\CommentsDensity\AnalyzeComments\Formatter;
66

77
use SavinMikhail\CommentsDensity\AnalyzeComments\Analyzer\DTO\Output\Report;
8-
98
use SavinMikhail\CommentsDensity\AnalyzeComments\Formatter\Filter\ViolatingCommentsOnlyFilter;
9+
1010
use function file_put_contents;
1111
use function htmlspecialchars;
1212
use function nl2br;

0 commit comments

Comments
 (0)