| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function run($request) |
||
| 10 | { |
||
| 11 | increase_time_limit_to(600); |
||
| 12 | $products = SecondHandProduct::get(); |
||
| 13 | foreach ($products as $product) { |
||
| 14 | DB::alteration_message('Publish: '.$product->Title); |
||
| 15 | $product->writeToStage('Stage'); |
||
| 16 | $product->publish('Stage', 'Live'); |
||
| 17 | } |
||
| 18 | DB::alteration_message(' ================= Completed ================= '); |
||
| 19 | } |
||
| 20 | } |
||
| 21 |
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.