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

Validator::validateExecutionData()   A

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