Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function run() |
||
22 | { |
||
23 | $faker = $this->faker; |
||
24 | |||
25 | //Find all managers that don't have a work environment yet |
||
26 | $managers = Manager::doesntHave('work_environment')->get(); |
||
27 | |||
28 | foreach($managers as $manager) { |
||
29 | $workEnvironment = new WorkEnvironment(); |
||
30 | $workEnvironment->manager_id = $manager->id; |
||
31 | $workEnvironment->fill([ |
||
32 | 'remote_work_allowed' => $this->faker->boolean(), |
||
33 | 'telework_allowed_frequency_id' => Frequency::inRandomOrder()->first()->id, |
||
34 | 'flexible_hours_frequency_id' => Frequency::inRandomOrder()->first()->id, |
||
35 | ]); |
||
36 | $workEnvironment->save(); |
||
37 | } |
||
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.