ValidatorRulesNotSuppliedException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
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 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
1
<?php
2
3
namespace R\Hive\Concrete\Exceptions;
4
5
use R\Hive\Contracts\Data\ValidatorInterface;
6
7
class ValidatorRulesNotSuppliedException extends DomainException
8
{
9
    public $rules;
10
    public $name;
11
12
    public function __construct(ValidatorInterface $validator, $rules)
13
    {
14
        $this->name = get_class($validator);
15
        $this->rules = $rules;
16
17
        $message = sprintf(
18
            'Validator [%s] has no supplied %s rules.',
19
            $this->name,
20
            $this->rules
21
        );
22
        parent::__construct($message);
23
    }
24
}
25