Completed
Push — master ( 5dd7ca...fbd608 )
by Bocharsky
07:06 queued 11s
created

StorageException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A translationExists() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\Common\Exception;
13
14
use Translation\Common\Exception;
15
16
/**
17
 * Storage related exceptions.
18
 *
19
 * @author Tobias Nyholm <[email protected]>
20
 */
21
class StorageException extends \RuntimeException implements Exception
22
{
23
    public static function translationExists(string $key, string $domain): self
24
    {
25
        return new self(sprintf('You cannot create a new translation with key "%s". That key does already exist in domain "%s".', $key, $domain));
26
    }
27
}
28