Skip to content

Commit f8e54b3

Browse files
committed
Add rule for trait renamed case only
1 parent 558aaae commit f8e54b3

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

docs/Ruleset.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ V115 | MAJOR | Trait public method parameter default value changed
163163
V116 | MAJOR | Trait protected method parameter default value changed
164164
V117 | MAJOR | Trait private method parameter default value changed
165165
V152 | PATCH | Trait method renamed (case only)
166+
V155 | PATCH | Trait renamed (case only)
166167

167168
# To classify
168169

src/PHPSemVerChecker/Configuration/LevelMapping.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class LevelMapping
126126
'V152' => Level::PATCH,
127127
'V153' => Level::PATCH,
128128
'V154' => Level::PATCH,
129+
'V155' => Level::PATCH,
129130
];
130131

131132
public static function getLevelForCode($code)

src/PHPSemVerChecker/Operation/TraitRenamedCaseOnly.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TraitRenamedCaseOnly extends Operation {
99
/**
1010
* @var string
1111
*/
12-
protected $code = 'V152';
12+
protected $code = 'V155';
1313
/**
1414
* @var string
1515
*/

tests/PHPSemVerChecker/Analyzer/TraitAnalyzerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function testTraitRenamedCaseOnly()
7777
$context = 'trait';
7878
$expectedLevel = Level::PATCH;
7979
Assert::assertDifference($report, $context, $expectedLevel);
80-
$this->assertSame('V152', $report[$context][$expectedLevel][0]->getCode());
80+
$this->assertSame('V155', $report[$context][$expectedLevel][0]->getCode());
8181
$this->assertSame('Trait was renamed (case only).', $report[$context][$expectedLevel][0]->getReason());
8282
$this->assertSame('testtrait', $report[$context][$expectedLevel][0]->getTarget());
8383
}

0 commit comments

Comments
 (0)