Passed
Push — master ( 6f4616...466e1a )
by Mike
02:15
created

Validator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 14
ccs 2
cts 6
cp 0.3333
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A validateExecutionData() 0 7 2
1
<?php
2
3
4
namespace Xervice\Web\Business\Executor\Validator;
5
6
7
use Xervice\Web\Business\Exception\WebExeption;
8
9
class Validator implements ValidatorInterface
10
{
11
    /**
12
     * @param array $executionData
13
     *
14
     * @throws \Xervice\Web\Business\Exception\WebExeption
15
     */
16 2
    public function validateExecutionData(array $executionData): void
17
    {
18 2
        if (!isset($executionData['_controller'])) {
19
            throw new WebExeption(
20
                sprintf(
21
                    'No callable given for route %s',
22
                    $executionData['_route']
23
                )
24
            );
25
        }
26
    }
27
}