1 | <?php declare(strict_types=1); |
||
28 | class Context extends Container implements ContextInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var RequestInterface |
||
32 | */ |
||
33 | private $request; |
||
34 | |||
35 | /** |
||
36 | * @param RequestInterface $request |
||
37 | 33 | * @param array $contextDefinitions |
|
38 | */ |
||
39 | 33 | public function __construct(RequestInterface $request, array $contextDefinitions = []) |
|
45 | |||
46 | /** |
||
47 | 26 | * @inheritdoc |
|
48 | */ |
||
49 | 26 | public function has($key): bool |
|
53 | |||
54 | /** |
||
55 | 24 | * @inheritdoc |
|
56 | */ |
||
57 | 24 | public function get($key) |
|
65 | |||
66 | /** |
||
67 | 24 | * @return RequestInterface |
|
68 | */ |
||
69 | 24 | public function getRequest(): RequestInterface |
|
73 | } |
||
74 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.