Skip to content

Commit 3cdd4d1

Browse files
authored
Merge pull request #943 from ergebnis/fix/error-identifier
Fix: Rename error identifier
2 parents 65aa2ec + bcd5db2 commit 3cdd4d1

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
For a full diff see [`2.10.1...main`][2.10.1...main].
1010

11+
### Fixed
12+
13+
- Renamed error identifier for `Methods\InvokeParentHookMethodRule` ([#943]), by [@localheinz]
14+
1115
## [`2.10.1`][2.10.1]
1216

1317
For a full diff see [`2.10.0...2.10.1`][2.10.0...2.10.1].
@@ -662,6 +666,7 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0].
662666
[#938]: https://github.com/ergebnis/phpstan-rules/pull/938
663667
[#939]: https://github.com/ergebnis/phpstan-rules/pull/939
664668
[#940]: https://github.com/ergebnis/phpstan-rules/pull/940
669+
[#943]: https://github.com/ergebnis/phpstan-rules/pull/943
665670

666671
[@cosmastech]: https://github.com/cosmastech
667672
[@enumag]: https://github.com/enumag

src/ErrorIdentifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public static function finalInAbstractClass(): self
4040
return new self('finalInAbstractClass');
4141
}
4242

43-
public static function invokeParentMethod(): self
43+
public static function invokeParentHookMethod(): self
4444
{
45-
return new self('invokeParentMethod');
45+
return new self('invokeParentHookMethod');
4646
}
4747

4848
public static function noCompact(): self

src/Methods/InvokeParentHookMethodRule.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function processNode(
126126

127127
return [
128128
Rules\RuleErrorBuilder::message($message)
129-
->identifier(ErrorIdentifier::invokeParentMethod()->toString())
129+
->identifier(ErrorIdentifier::invokeParentHookMethod()->toString())
130130
->build(),
131131
];
132132
}
@@ -145,7 +145,7 @@ public function processNode(
145145

146146
return [
147147
Rules\RuleErrorBuilder::message($message)
148-
->identifier(ErrorIdentifier::invokeParentMethod()->toString())
148+
->identifier(ErrorIdentifier::invokeParentHookMethod()->toString())
149149
->build(),
150150
];
151151
}
@@ -160,7 +160,7 @@ public function processNode(
160160

161161
return [
162162
Rules\RuleErrorBuilder::message($message)
163-
->identifier(ErrorIdentifier::invokeParentMethod()->toString())
163+
->identifier(ErrorIdentifier::invokeParentHookMethod()->toString())
164164
->build(),
165165
];
166166
}

test/Unit/ErrorIdentifierTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public function testFinalReturnsErrorIdentifier(): void
4242
self::assertSame('ergebnis.final', $errorIdentifier->toString());
4343
}
4444

45-
public function testInvokeParentMethodReturnsErrorIdentifier(): void
45+
public function testInvokeParentHookMethodReturnsErrorIdentifier(): void
4646
{
47-
$errorIdentifier = ErrorIdentifier::invokeParentMethod();
47+
$errorIdentifier = ErrorIdentifier::invokeParentHookMethod();
4848

49-
self::assertSame('ergebnis.invokeParentMethod', $errorIdentifier->toString());
49+
self::assertSame('ergebnis.invokeParentHookMethod', $errorIdentifier->toString());
5050
}
5151

5252
public function testNoAssignByReferenceReturnsErrorIdentifier(): void

0 commit comments

Comments
 (0)