1 | <?php |
||
20 | class PropertyCollection extends ArrayCollection |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * Adds a new Property on the collection. |
||
25 | * |
||
26 | * @param PropertyInterface $property |
||
27 | * |
||
28 | * @return bool |
||
29 | * @throws \InvalidArgumentException |
||
30 | */ |
||
31 | 11 | public function add($property) |
|
46 | |||
47 | /** |
||
48 | * Gets the current Property. |
||
49 | * @return Property |
||
50 | */ |
||
51 | 5 | public function current() |
|
55 | |||
56 | /** |
||
57 | * Gets the Property Iterator. |
||
58 | * @return PropertyIterator|Property[] |
||
59 | */ |
||
60 | 15 | public function getIterator() |
|
64 | |||
65 | /** |
||
66 | * Parse the Property Collection to string. |
||
67 | * @return string |
||
68 | */ |
||
69 | 10 | public function toString() |
|
79 | |||
80 | /** |
||
81 | * Find the properties by name. |
||
82 | * |
||
83 | * @param string $propertyName |
||
84 | * |
||
85 | * @return PropertyCollection |
||
86 | */ |
||
87 | 2 | public function getByName($propertyName) |
|
101 | |||
102 | /** |
||
103 | * Removes tags by name. |
||
104 | * |
||
105 | * @param string $propertyName |
||
106 | * |
||
107 | * @return PropertyCollection |
||
108 | */ |
||
109 | 1 | public function removeByName($propertyName) |
|
124 | } |
||
125 |
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.