Completed
Push — master ( ccb9d5...d7e68d )
by Alejandro
09:04
created

NonUniqueSlugException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromSlug() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Core\Exception;
5
6
use Shlinkio\Shlink\Common\Exception\InvalidArgumentException;
7
8
class NonUniqueSlugException extends InvalidArgumentException
9
{
10 1
    public static function fromSlug(string $slug): self
11
    {
12 1
        return new self(sprintf('Provided slug "%s" is not unique.', $slug));
13
    }
14
}
15