| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function run($request) |
||
| 12 | { |
||
| 13 | $items = ElectronicDelivery_OrderLog::get()->filter(array("Completed" => 0)); |
||
| 14 | foreach ($items as $item) { |
||
| 15 | if ($item->IsExpired()) { |
||
| 16 | //a simple write will take care of all the deletion process... |
||
| 17 | $item->deleteFolderIfExpired(); |
||
| 18 | } else { |
||
| 19 | //do nothing |
||
| 20 | } |
||
| 21 | } |
||
| 22 | } |
||
| 23 | } |
||
| 24 |
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.