Validator::validateExecutionData()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 3.1852

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
ccs 2
cts 6
cp 0.3333
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 3.1852
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
}