Conditions | 2 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
13 | public function run() |
||
14 | { |
||
15 | Purchase::delivered()->get()->each(function (Purchase $purchase) { |
||
16 | while ($purchase->isPendingStorage()) { |
||
17 | $guitar = factory(App\Guitar::class)->make(); |
||
18 | $guitar->rack_id = $purchase->make->racks->first()->id; |
||
19 | $guitar->make_id = $purchase->make_id; |
||
20 | $guitar->model_id = $purchase->make->models->first()->id; |
||
21 | $purchase->guitars()->save($guitar); |
||
22 | } |
||
23 | }); |
||
24 | } |
||
25 | } |
||
26 |
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.