File tree Expand file tree Collapse file tree 5 files changed +11
-2
lines changed
src/Doctrine/Instantiator Expand file tree Collapse file tree 5 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ includes:
44
55parameters:
66 level: max
7+ checkMissingOverrideMethodAttribute: true
78 phpVersion: 80400
89 paths:
910 - src
Original file line number Diff line number Diff line change 99use Doctrine \Instantiator \Exception \InvalidArgumentException ;
1010use Doctrine \Instantiator \Exception \UnexpectedValueException ;
1111use Exception ;
12+ use Override ;
1213use ReflectionClass ;
1314use ReflectionException ;
1415use Serializable ;
@@ -55,6 +56,7 @@ final class Instantiator implements InstantiatorInterface
5556 *
5657 * @template T of object
5758 */
59+ #[Override]
5860 public function instantiate (string $ className ): object
5961 {
6062 if (isset (self ::$ cachedCloneables [$ className ])) {
Original file line number Diff line number Diff line change 2525use DoctrineTest \InstantiatorTestAsset \XMLReaderAsset ;
2626use Exception ;
2727use Generator ;
28+ use Override ;
2829use PDORow ;
2930use PharException ;
3031use PHPUnit \Framework \TestCase ;
@@ -42,6 +43,7 @@ class InstantiatorTest extends TestCase
4243{
4344 private Instantiator $ instantiator ;
4445
46+ #[Override]
4547 protected function setUp (): void
4648 {
4749 parent ::setUp ();
Original file line number Diff line number Diff line change 66
77use ArrayObject ;
88use BadMethodCallException ;
9+ use Override ;
910use Serializable ;
1011
1112/**
@@ -27,18 +28,18 @@ public function __construct()
2728 }
2829
2930 /**
30- * {@inheritDoc}
31- *
3231 * Should not be called
3332 *
3433 * @throws BadMethodCallException
3534 */
35+ #[Override]
3636 public function unserialize ($ serialized ): void
3737 {
3838 throw new BadMethodCallException ('Not supposed to be called! ' );
3939 }
4040
4141 /** @param mixed[] $data */
42+ #[Override]
4243 public function __unserialize (array $ data ): void
4344 {
4445 throw new BadMethodCallException ('Not supposed to be called! ' );
Original file line number Diff line number Diff line change 55namespace DoctrineTest \InstantiatorTestAsset ;
66
77use BadMethodCallException ;
8+ use Override ;
89use Serializable ;
910
1011/**
@@ -22,6 +23,7 @@ public function __construct()
2223 throw new BadMethodCallException ('Not supposed to be called! ' );
2324 }
2425
26+ #[Override]
2527 public function serialize (): string
2628 {
2729 return '' ;
@@ -34,6 +36,7 @@ public function serialize(): string
3436 *
3537 * @throws BadMethodCallException
3638 */
39+ #[Override]
3740 public function unserialize (string $ serialized ): void
3841 {
3942 throw new BadMethodCallException ('Not supposed to be called! ' );
You can’t perform that action at this time.
0 commit comments