Conditions | 4 |
Paths | 6 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function Content() |
||
20 | { |
||
21 | $html = ''; |
||
22 | $orderSteps = OrderStep::get()->limit(OrderStep::get()->count()-1); |
||
23 | $html = '<ul>'; |
||
24 | $done = false; |
||
25 | foreach ($orderSteps as $orderStep) { |
||
26 | $count = Order::get() |
||
27 | ->filter(array('StatusID' => $orderStep->ID, 'CancelledByID' => 0)) |
||
28 | ->count(); |
||
29 | if ($count > 0) { |
||
30 | $done = true; |
||
31 | $html .= '<li><strong>'.$orderStep->Title.'</strong>: <span>'.$count.'</span><em>'.$orderStep->Description.'</em></li>'; |
||
32 | } |
||
33 | } |
||
34 | if ($done === false) { |
||
35 | $html .= '<li>All orders have been archived</li>'; |
||
36 | } |
||
37 | $html .= '<ul>'; |
||
38 | return $html; |
||
39 | } |
||
40 | |||
47 |
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.