| 1 | <?php |
||
| 19 | class Phone extends ContactMethod |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | const ATTRIBUTE = 'phone'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get Phone |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function getPhone() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Set Phone |
||
| 38 | * |
||
| 39 | * @param string $phone |
||
| 40 | * |
||
| 41 | * @return ContactMethod |
||
| 42 | */ |
||
| 43 | public function setPhone($phone) |
||
| 47 | } |
||
| 48 |
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.