Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
5 | 9 | public function run() { |
|
6 | $teams = [ |
||
7 | 9 | ['league_id' => 1, 'name' => 'Brian Brushwood'], |
|
8 | 9 | ['league_id' => 1, 'name' => 'Justin Robert Young'], |
|
9 | 9 | ['league_id' => 1, 'name' => 'Tom Merritt'], |
|
10 | 9 | ['league_id' => 1, 'name' => 'C. Robert Cargill'], |
|
11 | 9 | ['league_id' => 1, 'name' => 'Scott Johnson'], |
|
12 | 9 | ['league_id' => 1, 'name' => 'Sarah Lane'], |
|
13 | 9 | ]; |
|
14 | |||
15 | 9 | foreach ($teams as $team) { |
|
16 | 9 | LeagueTeam::create($team); |
|
17 | 9 | } |
|
18 | |||
19 | 9 | } |
|
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.