Completed
Push — master ( 3830bc...2c9d17 )
by Samuel
02:31
created

ValidationFailedException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getValidator() 0 4 1
1
<?php
2
3
namespace Kelemen\ApiNette\Exception;
4
5
use Kelemen\ApiNette\Validator\ValidatorInterface;
6
7
class ValidationFailedException extends ApiNetteException
8
{
9
    /** @var ValidatorInterface */
10
    private $validator;
11
12
    /**
13
     * @param ValidatorInterface $validator
14
     */
15 2
    public function __construct(ValidatorInterface $validator)
16
    {
17 2
        parent::__construct("", 0, null);
18 2
        $this->validator = $validator;
19 2
    }
20
21
    /**
22
     * @return ValidatorInterface
23
     */
24 2
    public function getValidator()
25
    {
26 2
        return $this->validator;
27
    }
28
}
29