1 | <?php |
||
35 | final class ExtensionFilter extends FilterIterator |
||
36 | { |
||
37 | /** |
||
38 | * List of allowed file extensions |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | private $whitelist; |
||
43 | |||
44 | /** |
||
45 | * |
||
46 | * @param Iterator $iterator |
||
47 | * @param array $whitelist |
||
48 | */ |
||
49 | 1 | public function __construct(Iterator $iterator, array $whitelist) |
|
54 | |||
55 | /** |
||
56 | * |
||
57 | * @return boolean |
||
58 | */ |
||
59 | 1 | public function accept() |
|
75 | } |
||
76 |
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.