TestUserNonCompositeSeeder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 13
c 1
b 0
f 0
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 15 1
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class TestUserNonCompositeSeeder extends Seeder
6
{
7
    /**
8
     * Run the database seeds.
9
     *
10
     * @return void
11
     */
12
    public function run()
13
    {
14
        \MaksimM\CompositePrimaryKeys\Tests\Stubs\TestUserNonComposite::create([
15
            'user_id'         => 1,
16
            'organization_id' => \MaksimM\CompositePrimaryKeys\Tests\Stubs\TestOrganization::whereName('Foo')
17
                ->first()
18
                ->organization_id,
19
            'name' => 'Foo',
20
        ]);
21
        \MaksimM\CompositePrimaryKeys\Tests\Stubs\TestUserNonComposite::create([
22
            'user_id'         => 2,
23
            'organization_id' => \MaksimM\CompositePrimaryKeys\Tests\Stubs\TestOrganization::whereName('Foo')
24
                ->first()
25
                ->organization_id,
26
            'name' => 'Bar',
27
        ]);
28
    }
29
}
30