| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 15 | class Collection extends ExtendCollection |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @inheritDoc |
||
| 19 | */ |
||
| 20 | protected function _initSelect() |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Collection |
||
| 35 | */ |
||
| 36 | public function addExcludeGuestFilter(): self |
||
| 37 | { |
||
| 38 | $this->getSelect()->where('main_table.customer_is_guest = 0'); |
||
| 39 | return $this; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param int $orderId |
||
| 44 | * @return Collection |
||
| 45 | */ |
||
| 46 | public function addIdFilter(int $orderId): self |
||
| 47 | { |
||
| 48 | $this->getSelect()->where('main_table.entity_id = ?', $orderId); |
||
| 49 | return $this; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return Collection |
||
| 54 | */ |
||
| 55 | public function addOmittedFilter(): self |
||
| 59 | } |
||
| 60 | } |
||
| 61 |
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. Please note the @ignore annotation hint above.