Completed
Push — master ( b31514...603a9f )
by Changwan
06:16
created

UnknownMigrationInformation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 26
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
A getId() 0 4 1
1
<?php
2
namespace Wandu\Database\Migrator;
3
4
use RuntimeException;
5
use Wandu\Database\Migrator\Contracts\MigrationInformation;
6
7
class UnknownMigrationInformation implements MigrationInformation
8
{
9
    /** @var string */
10
    protected $id;
11
12
    public function __construct(string $id)
13
    {
14
        $this->id = $id;
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function getName(): string
21
    {
22
        throw new RuntimeException('name is unknown');
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getId(): string
29
    {
30
        return $this->id;
31
    }
32
}
33