Skip to content

Commit 384bfe2

Browse files
committed
Removing impossible scenario, since strings are always non-empty
1 parent 38f532c commit 384bfe2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/Generator/JekyllPageGenerator.php

-7
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ public function createViolationDoc(Violation $violation): string
4949
private function getFrontMatter(Sniff $sniff): string
5050
{
5151
$sniffName = $sniff->getSniffName();
52-
if ($sniffName === '') {
53-
return <<<'MD'
54-
---
55-
---
56-
57-
MD;
58-
}
5952

6053
return <<<MD
6154
---

src/Value/Sniff.php

+4
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,25 @@ public function __construct(
7171
$this->violations = $violations;
7272
}
7373

74+
/** @return non-empty-string */
7475
public function getCode(): string
7576
{
7677
return $this->code;
7778
}
7879

80+
/** @return non-empty-string */
7981
public function getStandardName(): string
8082
{
8183
return $this->standardName;
8284
}
8385

86+
/** @return non-empty-string */
8487
public function getCategoryName(): string
8588
{
8689
return $this->categoryName;
8790
}
8891

92+
/** @return non-empty-string */
8993
public function getSniffName(): string
9094
{
9195
return $this->sniffName;

0 commit comments

Comments
 (0)