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

ValidatorNotExistsException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
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