Completed
Push — not-exists ( 0b7a0f )
by Sullivan
05:13 queued 02:01
created

ValidatorNotExistsException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
namespace SLLH\IsoCodesValidator\Exception;
4
5
use SLLH\IsoCodesValidator\ConstraintInterface;
6
7
/**
8
 * @author Sullivan Senechal <[email protected]>
9
 */
10
final class ValidatorNotExistsException extends \Exception
11
{
12
    /**
13
     * @param ConstraintInterface $constraint
14
     * @param \Exception|null     $previous
15
     */
16
    public function __construct(ConstraintInterface $constraint, \Exception $previous = null)
17
    {
18
        $message = 'The '.$constraint->getIsoCodesClass().' class does not exist.'
19
            .' This class is available since version '.$constraint->getIsoCodesVersion().' of IsoCodes library.'
20
            .' Please consider upgrading.';
21
22
        parent::__construct($message, 0, $previous);
23
    }
24
}
25