Skip to content

Commit 4f61982

Browse files
wip
1 parent 64908ce commit 4f61982

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/CLI/Printer/GitlabPrinter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public function print(array $violationsCollection): string
1212
$allErrors = [];
1313

1414
/**
15-
* @var string $key
16-
* @var Violation[] $violationsByFqcn
15+
* @var string $key
16+
* @var array<Violation> $violationsByFqcn
1717
*/
1818
foreach ($violationsCollection as $class => $violationsByFqcn) {
1919
foreach ($violationsByFqcn as $violation) {

tests/E2E/Cli/CheckCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function test_gitlab_format_output(): void
205205

206206
$display = $cmdTester->getDisplay();
207207

208-
$this->assertJson($display);
208+
self::assertJson($display);
209209

210210
self::assertSame(<<<JSON
211211
[{"description":"should have a name that matches *Controller because all controllers should be end name with Controller","check_name":"App\\\\Controller\\\\Foo.should-have-a-name-that-matches-controller-because-all-controllers-should-be-end-name-with-controller","fingerprint":"1e960c3f49b5ec63ece40321072ef2bd0bc33ad11b7be326f304255d277dc860","severity":"major","location":{"path":"Controller\/Foo.php","lines":{"begin":1}}}]
@@ -223,10 +223,10 @@ public function test_gitlab_format_output_no_errors(): void
223223

224224
$display = $cmdTester->getDisplay();
225225

226-
$this->assertJson($display);
226+
self::assertJson($display);
227227

228228
$json = json_decode($display, true);
229-
$this->assertCount(0, $json);
229+
self::assertCount(0, $json);
230230
}
231231

232232
protected function runCheck(

tests/Unit/CLI/Printer/GitlabPrinterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public function test_print_with_no_violations(): void
4444

4545
$result = $printer->print($violationsCollection);
4646

47-
$this->assertIsString($result, 'Result should be a string');
48-
$this->assertJson($result, 'Result should be a valid JSON string');
47+
self::assertIsString($result, 'Result should be a string');
48+
self::assertJson($result, 'Result should be a valid JSON string');
4949

5050
$decodedResult = json_decode($result, true);
51-
$this->assertEmpty($decodedResult, 'Result should be an empty array');
51+
self::assertEmpty($decodedResult, 'Result should be an empty array');
5252
}
5353
}

0 commit comments

Comments
 (0)