Completed
Push — master ( 9f49ce...6e65c6 )
by Zach
02:45 queued 40s
created

Seeder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
run() 0 1 ?
A call() 0 4 1
A setRunner() 0 4 1
1
<?php
2
3
namespace Yarak\DB\Seeders;
4
5
abstract class Seeder
6
{
7
    /**
8
     * SeedRunner instance.
9
     *
10
     * @var SeedRunner
11
     */
12
    protected $runner;
13
14
    /**
15
     * Run the database seed logic.
16
     */
17
    abstract public function run();
18
19
    /**
20
     * Call the run method on the given seeder class.
21
     *
22
     * @param string $class
23
     */
24
    protected function call($class)
25
    {
26
        $this->runner->run($class);
27
    }
28
29
    /**
30
     * Set SeedRunner instance on object.
31
     *
32
     * @param SeedRunner $runner
33
     */
34
    public function setRunner(SeedRunner $runner)
35
    {
36
        $this->runner = $runner;
37
    }
38
}
39