| 1 | <?php |
||
| 12 | class AccessLog extends AbstractProvider |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var StorageInterface |
||
| 16 | */ |
||
| 17 | protected $storage; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var ServerRequestInterface |
||
| 21 | */ |
||
| 22 | public $request; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | public $data = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var LoggerInterface $logger |
||
| 31 | */ |
||
| 32 | public $logger; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * AccessLog constructor. |
||
| 36 | * @param ServerRequestInterface $request |
||
| 37 | * @param StorageInterface $storage |
||
| 38 | */ |
||
| 39 | 5 | public function __construct(ServerRequestInterface $request, StorageInterface $storage) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param LoggerInterface $logger |
||
| 49 | */ |
||
| 50 | 1 | public function setLogger(LoggerInterface $logger) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @return array |
||
| 57 | */ |
||
| 58 | 2 | public function getData() |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @param $key |
||
| 65 | * @param $value |
||
| 66 | * @return $this |
||
| 67 | */ |
||
| 68 | 1 | public function add($key, $value) |
|
| 73 | |||
| 74 | /** |
||
| 75 | * @return mixed |
||
| 76 | */ |
||
| 77 | 1 | public function record() |
|
| 90 | } |
||
| 91 |
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 theSoncalls the wrong method in the parent class.