DuplicateValuesException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 14
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace TraderInteractive\Filter\Exceptions;
4
5
use TraderInteractive\Exceptions\FilterException;
6
7
class DuplicateValuesException extends FilterException
8
{
9
    /**
10
     * @var string
11
     */
12
    const ERROR_FORMAT = "Array contains the following duplicate values: %s";
13
14
    /**
15
     * @param array $duplicateValues The duplicate values found in the array.
16
     */
17
    public function __construct(array $duplicateValues)
18
    {
19
        $message = sprintf(self::ERROR_FORMAT, var_export($duplicateValues, true));
20
        parent::__construct($message);
21
    }
22
}
23