NoDefaultParam   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 11
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource;
6
7
use BEAR\Resource\Exception\ParameterException;
8
use Override;
9
use Ray\Di\InjectorInterface;
10
11
final class NoDefaultParam implements ParamInterface
12
{
13
    /**
14
     * {@inheritDoc}
15 1
     */
16
    #[Override]
17 1
    public function __invoke(string $varName, array $query, InjectorInterface $injector): never
18
    {
19 1
        unset($query, $injector);
20
21
        throw new ParameterException($varName);
22
    }
23
}
24