| Conditions | 5 |
| Paths | 5 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function AllPanels() |
||
| 25 | { |
||
| 26 | $panels = parent::AllPanels(); |
||
| 27 | $al = ArrayList::create(); |
||
| 28 | foreach ($panels as $panel) { |
||
| 29 | if ($panel instanceof EcommerceDashboardPanel) { |
||
| 30 | if ($panel->registered()) { |
||
| 31 | if ($panel->ClassName !== 'EcommerceDashboardPanel') { |
||
| 32 | $al->push($panel); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | return $al; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.