1 | <?php |
||
19 | class Email extends ContactMethod |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | const ATTRIBUTE = 'email'; |
||
25 | |||
26 | /** |
||
27 | * Get Email |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | public function getEmail() |
||
35 | |||
36 | /** |
||
37 | * Set Email |
||
38 | * |
||
39 | * @param string $email |
||
40 | * |
||
41 | * @return ContactMethod |
||
42 | */ |
||
43 | public function setEmail($email) |
||
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 theSon
calls the wrong method in the parent class.