DuplicateKeyException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Decline\TransformatBundle\Exception;
4
5
/**
6
 * Class DuplicateKeyException
7
 * @package Decline\TransformatBundle\Exception
8
 */
9
class DuplicateKeyException extends \Exception
10
{
11
12
    /**
13
     * DuplicateKeyException constructor.
14
     * @param string $key
15
     * @param int $fileName
16
     */
17 1
    public function __construct($key, $fileName)
18
    {
19 1
        parent::__construct(
20
            sprintf(
21 1
                'Duplicate translation key "%s" found in File %s',
22
                $key,
23
                $fileName
24
            ),
25 1
            0,
26 1
            null
27
        );
28
    }
29
}