Skip to content

Commit 0d5e841

Browse files
committed
Override attribute
1 parent 023fc24 commit 0d5e841

15 files changed

Lines changed: 21 additions & 1 deletion

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
parameters:
22
rememberPossiblyImpureFunctionValues: false
3+
checkMissingOverrideMethodAttribute: true

src/Exception/ParserError.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function __construct(
2323
$this->setLocation($location);
2424
}
2525

26+
#[\Override]
2627
final public function isOutputable() : bool
2728
{
2829
return true;

src/Fragment/FragmentSet.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ final class FragmentSet extends ImplicitObjectMap
1414
{
1515
protected const INNER_CLASS = Fragment::class;
1616

17+
#[\Override]
1718
protected function getKey(object $object) : string
1819
{
1920
return $object->getName(); // @phpstan-ignore method.notFound

src/Operation/OperationSet.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ final class OperationSet extends ImplicitObjectMap
1414
{
1515
protected const INNER_CLASS = Operation::class;
1616

17+
#[\Override]
1718
protected function getKey(object $object) : string
1819
{
1920
return $object->getName() // @phpstan-ignore method.notFound

src/TokenContainer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public function assertNextValue(TokenType $tokenType, string $value, string $exc
109109
/**
110110
* @return \ArrayIterator<int, Token>
111111
*/
112+
#[\Override]
112113
public function getIterator() : \ArrayIterator
113114
{
114115
return new \ArrayIterator($this->tokens);

src/TypeRef/ListTypeRef.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public function getInnerRef() : TypeRef
1717
return $this->innerRef;
1818
}
1919

20+
#[\Override]
2021
public function print() : string
2122
{
2223
return '[' . $this->innerRef->print() . ']';

src/TypeRef/NamedTypeRef.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public function getName() : string
1717
return $this->name;
1818
}
1919

20+
#[\Override]
2021
public function print() : string
2122
{
2223
return $this->name;

src/TypeRef/NotNullRef.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public function getInnerRef() : TypeRef
1717
return $this->innerRef;
1818
}
1919

20+
#[\Override]
2021
public function print() : string
2122
{
2223
return $this->innerRef->print() . '!';

src/Value/ArgumentValueSet.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ final class ArgumentValueSet extends ImplicitObjectMap
1414
{
1515
protected const INNER_CLASS = ArgumentValue::class;
1616

17+
#[\Override]
1718
protected function getKey(object $object) : string
1819
{
1920
return $object->getName(); // @phpstan-ignore method.notFound

src/Value/EnumLiteral.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ public function __construct(
1212
{
1313
}
1414

15+
#[\Override]
1516
public function getRawValue() : string
1617
{
1718
return $this->value;
1819
}
1920

21+
#[\Override]
2022
public function accept(ValueVisitor $valueVisitor) : mixed
2123
{
2224
return $valueVisitor->visitEnumLiteral($this);

0 commit comments

Comments
 (0)