Skip to content

Commit 069c83f

Browse files
Fix CS/WS issues
1 parent b463717 commit 069c83f

22 files changed

+48
-148
lines changed

src/CodeCoverage.php

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,24 @@
3939
final class CodeCoverage
4040
{
4141
private const UNCOVERED_FILES = 'UNCOVERED_FILES';
42-
4342
private Driver $driver;
44-
4543
private Filter $filter;
46-
4744
private Wizard $wizard;
48-
4945
private bool $checkForUnintentionallyCoveredCode = false;
50-
51-
private bool $includeUncoveredFiles = true;
52-
53-
private bool $ignoreDeprecatedCode = false;
54-
55-
private ?string $currentId = null;
56-
57-
private ?TestSize $currentSize = null;
58-
46+
private bool $includeUncoveredFiles = true;
47+
private bool $ignoreDeprecatedCode = false;
48+
private ?string $currentId = null;
49+
private ?TestSize $currentSize = null;
5950
private ProcessedCodeCoverageData $data;
60-
6151
private bool $useAnnotationsForIgnoringCode = true;
62-
63-
private array $tests = [];
52+
private array $tests = [];
6453

6554
/**
6655
* @psalm-var list<class-string>
6756
*/
6857
private array $parentClassesExcludedFromUnintentionallyCoveredCodeCheck = [];
69-
70-
private ?FileAnalyser $analyser = null;
71-
72-
private ?string $cacheDirectory = null;
58+
private ?FileAnalyser $analyser = null;
59+
private ?string $cacheDirectory = null;
7360

7461
public function __construct(Driver $driver, Filter $filter)
7562
{

src/Driver/Driver.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ abstract class Driver
5252
*
5353
* @see http://xdebug.org/docs/code_coverage
5454
*/
55-
public const BRANCH_HIT = 1;
56-
55+
public const BRANCH_HIT = 1;
5756
private bool $collectBranchAndPathCoverage = false;
58-
59-
private bool $detectDeadCode = false;
57+
private bool $detectDeadCode = false;
6058

6159
public function canCollectBranchAndPathCoverage(): bool
6260
{

src/Node/AbstractNode.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,9 @@
2323
abstract class AbstractNode implements Countable
2424
{
2525
private string $name;
26-
2726
private string $pathAsString;
28-
2927
private array $pathAsArray;
30-
3128
private ?AbstractNode $parent;
32-
3329
private string $id;
3430

3531
public function __construct(string $name, self $parent = null)

src/Node/CrapIndex.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
final class CrapIndex
1818
{
1919
private int $cyclomaticComplexity;
20-
2120
private float $codeCoverage;
2221

2322
public function __construct(int $cyclomaticComplexity, float $codeCoverage)

src/Node/Directory.php

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -32,48 +32,30 @@ final class Directory extends AbstractNode implements IteratorAggregate
3232
/**
3333
* @var list<File>
3434
*/
35-
private array $files = [];
36-
37-
private ?array $classes = null;
38-
39-
private ?array $traits = null;
40-
35+
private array $files = [];
36+
private ?array $classes = null;
37+
private ?array $traits = null;
4138
private ?array $functions = null;
4239

4340
/**
4441
* @psalm-var null|array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int}
4542
*/
46-
private ?array $linesOfCode = null;
47-
48-
private int $numFiles = -1;
49-
50-
private int $numExecutableLines = -1;
51-
52-
private int $numExecutedLines = -1;
53-
43+
private ?array $linesOfCode = null;
44+
private int $numFiles = -1;
45+
private int $numExecutableLines = -1;
46+
private int $numExecutedLines = -1;
5447
private int $numExecutableBranches = -1;
55-
56-
private int $numExecutedBranches = -1;
57-
58-
private int $numExecutablePaths = -1;
59-
60-
private int $numExecutedPaths = -1;
61-
62-
private int $numClasses = -1;
63-
64-
private int $numTestedClasses = -1;
65-
66-
private int $numTraits = -1;
67-
68-
private int $numTestedTraits = -1;
69-
70-
private int $numMethods = -1;
71-
72-
private int $numTestedMethods = -1;
73-
74-
private int $numFunctions = -1;
75-
76-
private int $numTestedFunctions = -1;
48+
private int $numExecutedBranches = -1;
49+
private int $numExecutablePaths = -1;
50+
private int $numExecutedPaths = -1;
51+
private int $numClasses = -1;
52+
private int $numTestedClasses = -1;
53+
private int $numTraits = -1;
54+
private int $numTestedTraits = -1;
55+
private int $numMethods = -1;
56+
private int $numTestedMethods = -1;
57+
private int $numFunctions = -1;
58+
private int $numTestedFunctions = -1;
7759

7860
public function count(): int
7961
{

src/Node/File.php

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,49 +19,30 @@
1919
final class File extends AbstractNode
2020
{
2121
private array $lineCoverageData;
22-
2322
private array $functionCoverageData;
24-
2523
private array $testData;
26-
27-
private int $numExecutableLines = 0;
28-
29-
private int $numExecutedLines = 0;
30-
24+
private int $numExecutableLines = 0;
25+
private int $numExecutedLines = 0;
3126
private int $numExecutableBranches = 0;
32-
33-
private int $numExecutedBranches = 0;
34-
35-
private int $numExecutablePaths = 0;
36-
37-
private int $numExecutedPaths = 0;
38-
39-
private array $classes = [];
40-
41-
private array $traits = [];
42-
43-
private array $functions = [];
27+
private int $numExecutedBranches = 0;
28+
private int $numExecutablePaths = 0;
29+
private int $numExecutedPaths = 0;
30+
private array $classes = [];
31+
private array $traits = [];
32+
private array $functions = [];
4433

4534
/**
4635
* @psalm-return array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int}
4736
*/
4837
private array $linesOfCode;
49-
50-
private ?int $numClasses = null;
51-
52-
private int $numTestedClasses = 0;
53-
54-
private ?int $numTraits = null;
55-
56-
private int $numTestedTraits = 0;
57-
58-
private ?int $numMethods = null;
59-
60-
private ?int $numTestedMethods = null;
61-
38+
private ?int $numClasses = null;
39+
private int $numTestedClasses = 0;
40+
private ?int $numTraits = null;
41+
private int $numTestedTraits = 0;
42+
private ?int $numMethods = null;
43+
private ?int $numTestedMethods = null;
6244
private ?int $numTestedFunctions = null;
63-
64-
private array $codeUnitsByLine = [];
45+
private array $codeUnitsByLine = [];
6546

6647
/**
6748
* @psalm-param array{linesOfCode: int, commentLinesOfCode: int, nonCommentLinesOfCode: int} $linesOfCode

src/Report/Html/Colors.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
final class Colors
1616
{
1717
private string $successLow;
18-
1918
private string $successMedium;
20-
2119
private string $successHigh;
22-
2320
private string $warning;
24-
2521
private string $danger;
2622

2723
public static function default(): self

src/Report/Html/Facade.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,9 @@
2323
final class Facade
2424
{
2525
private string $templatePath;
26-
2726
private string $generator;
28-
2927
private Colors $colors;
30-
3128
private Thresholds $thresholds;
32-
3329
private CustomCssFile $customCssFile;
3430

3531
public function __construct(string $generator = '', ?Colors $colors = null, ?Thresholds $thresholds = null, ?CustomCssFile $customCssFile = null)

src/Report/Html/Renderer.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,10 @@
2828
abstract class Renderer
2929
{
3030
protected string $templatePath;
31-
3231
protected string $generator;
33-
3432
protected string $date;
35-
3633
protected Thresholds $thresholds;
37-
3834
protected bool $hasBranchCoverage;
39-
4035
protected string $version;
4136

4237
public function __construct(string $templatePath, string $generator, string $date, Thresholds $thresholds, bool $hasBranchCoverage)

src/Report/Html/Renderer/File.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,9 @@ final class File extends Renderer
111111
/**
112112
* @psalm-var array<int,true>
113113
*/
114-
private static array $keywordTokens = [];
115-
114+
private static array $keywordTokens = [];
116115
private static array $formattedSourceCache = [];
117-
118-
private int $htmlSpecialCharsFlags = ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE;
116+
private int $htmlSpecialCharsFlags = ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE;
119117

120118
public function render(FileNode $node, string $file): void
121119
{

0 commit comments

Comments
 (0)