Completed
Push — master ( 603a9f...7527cc )
by Changwan
05:44
created

UnknownMigrationInformation::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
namespace Wandu\Migrator;
3
4
use RuntimeException;
5
use Wandu\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