Validator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

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

1 Method

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