NameIsReserved   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A new() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Finder\Exception;
6
7
use InvalidArgumentException;
8
use function sprintf;
9
use const PHP_EOL;
10
11
final class NameIsReserved extends InvalidArgumentException implements FinderException
12
{
13
    public static function new(string $version) : self
14
    {
15
        return new self(sprintf(
16
            'Cannot load a migrations with the name "%s" because it is reserved by Doctrine Migrations.'
17
            . PHP_EOL
18
            . 'It is used to revert all migrations including the first one.',
19
            $version
20
        ));
21
    }
22
}
23