| 1 | <?php  | 
            ||
| 5 | class ApiError extends \Exception  | 
            ||
| 6 | { | 
            ||
| 7 | /**  | 
            ||
| 8 | * @var string  | 
            ||
| 9 | */  | 
            ||
| 10 | private $id;  | 
            ||
| 11 | |||
| 12 | /**  | 
            ||
| 13 | * @param string $id  | 
            ||
| 14 | * @param int $error  | 
            ||
| 15 | */  | 
            ||
| 16 | 1 | public function __construct($id, $error)  | 
            |
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * @return string  | 
            ||
| 24 | */  | 
            ||
| 25 | public function getId()  | 
            ||
| 29 | |||
| 30 | /**  | 
            ||
| 31 | * @return string  | 
            ||
| 32 | */  | 
            ||
| 33 | public function write()  | 
            ||
| 40 | }  | 
            ||
| 41 | 
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.