LeagueTeamsTableSeeder::run()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 12
cts 12
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 10
nc 2
nop 0
crap 2
1
<?php
2
3
class LeagueTeamsTableSeeder extends Seeder {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
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
}