Skip to content

Commit 2427228

Browse files
committed
Drop more useless code
1 parent f71a0c0 commit 2427228

File tree

3 files changed

+3
-29
lines changed

3 files changed

+3
-29
lines changed

src/AnalysisResult.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,19 @@ class AnalysisResult
4444
/** @var string[] */
4545
private $warnings;
4646

47-
/** @var bool */
48-
private $defaultLevelUsed;
49-
50-
/** @var bool */
51-
private $savedResultCache;
52-
5347
/**
5448
* @param \CodeLts\CliTools\Error[] $fileSpecificErrors
5549
* @param string[] $notFileSpecificErrors
5650
* @param string[] $internalErrors
5751
* @param string[] $warnings
58-
* @param bool $defaultLevelUsed
5952
* @param string|null $projectConfigFile
60-
* @param bool $savedResultCache
6153
*/
6254
public function __construct(
6355
array $fileSpecificErrors,
6456
array $notFileSpecificErrors,
6557
array $internalErrors,
6658
array $warnings,
67-
bool $defaultLevelUsed,
68-
?string $projectConfigFile,
69-
bool $savedResultCache
59+
?string $projectConfigFile
7060
)
7161
{
7262
usort(
@@ -88,9 +78,7 @@ static function (Error $a, Error $b): int {
8878
$this->notFileSpecificErrors = $notFileSpecificErrors;
8979
$this->internalErrors = $internalErrors;
9080
$this->warnings = $warnings;
91-
$this->defaultLevelUsed = $defaultLevelUsed;
9281
$this->projectConfigFile = $projectConfigFile;
93-
$this->savedResultCache = $savedResultCache;
9482
}
9583

9684
public function hasErrors(): bool
@@ -140,19 +128,9 @@ public function hasWarnings(): bool
140128
return count($this->warnings) > 0;
141129
}
142130

143-
public function isDefaultLevelUsed(): bool
144-
{
145-
return $this->defaultLevelUsed;
146-
}
147-
148131
public function hasInternalErrors(): bool
149132
{
150133
return count($this->internalErrors) > 0;
151134
}
152135

153-
public function isResultCacheSaved(): bool
154-
{
155-
return $this->savedResultCache;
156-
}
157-
158136
}

tests/ErrorFormatter/CheckstyleErrorFormatterTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ public function testTraitPath(): void
177177
[],
178178
[],
179179
[],
180-
false,
181-
null,
182-
true
180+
null
183181
), $this->getOutput());
184182
$this->assertXmlStringEqualsXmlString('<checkstyle>
185183
<file name="FooTrait.php">

tests/ErrorFormatterTestCase.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ protected function getAnalysisResult(int $numFileErrors, int $numGenericErrors):
109109
$genericErrors,
110110
[],
111111
[],
112-
false,
113-
null,
114-
true
112+
null
115113
);
116114
}
117115

0 commit comments

Comments
 (0)