Conditions | 3 |
Paths | 3 |
Total Lines | 24 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | function run() |
||
7 | { |
||
8 | $leagues = [ |
||
9 | 'friendly' => 5, |
||
10 | 'europa league' => 2 |
||
11 | ]; |
||
12 | |||
13 | foreach ($leagues as $league => $dayMatches) { |
||
14 | $league = \App\Lib\DsManager\Models\Orm\League::create( |
||
15 | [ |
||
16 | 'name' => $league |
||
17 | ] |
||
18 | ); |
||
19 | |||
20 | for ($i = 1; $i <= $dayMatches; $i++) { |
||
21 | \App\Lib\DsManager\Models\Orm\MatchDay::create( |
||
22 | [ |
||
23 | 'league_id' => $league->id, |
||
24 | 'day' => $i |
||
25 | ] |
||
26 | ); |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 | } |
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.