1 | <?php |
||
37 | class EeProductObserver extends ProductObserver |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * Merge's and return's the entity with the passed attributes and set's the |
||
42 | * passed status. |
||
43 | * |
||
44 | * @param array $entity The entity to merge the attributes into |
||
45 | * @param array $attr The attributes to be merged |
||
46 | * @param string|null $changeSetName The change set name to use |
||
47 | * |
||
48 | * @return array The merged entity |
||
49 | */ |
||
50 | protected function mergeEntity(array $entity, array $attr, $changeSetName = null) |
||
60 | |||
61 | /** |
||
62 | * Initialize the product with the passed attributes and returns an instance. |
||
63 | * |
||
64 | * @param array $attr The product attributes |
||
65 | * |
||
66 | * @return array The initialized product |
||
67 | */ |
||
68 | protected function initializeProduct(array $attr) |
||
90 | |||
91 | /** |
||
92 | * Persist's the passed product data. |
||
93 | * |
||
94 | * @param array $product The product data to persist |
||
95 | * |
||
96 | * @return void |
||
97 | */ |
||
98 | protected function persistProduct($product) |
||
104 | |||
105 | /** |
||
106 | * Set's the row ID of the product that has been created recently. |
||
107 | * |
||
108 | * @param string $rowId The row ID |
||
109 | * |
||
110 | * @return void |
||
111 | */ |
||
112 | protected function setLastRowId($rowId) |
||
116 | |||
117 | /** |
||
118 | * Return's the next available product entity ID. |
||
119 | * |
||
120 | * @return integer The next available product entity ID |
||
121 | */ |
||
122 | protected function nextIdentifier() |
||
126 | } |
||
127 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.