DuplicateValuesException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 1
b 0
f 0
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