Invoker::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 0
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
// phpcs:ignoreFile
3
4
namespace BEAR\Resource;
5
6
final class Invoker implements InvokerInterface
7
{
8
    public function __construct(
9
        private readonly PhpClassInvoker $classInvoker
10
    ) {
11
    }
12
13
    /**
14
     * {@inheritdoc}
15
     *
16
     * @psalm-suppress PossiblyUnusedReturnValue
17
     */
18
    #[\Override]
19
    public function invoke(AbstractRequest $request): ResourceObject
20
    {
21
        return $request->resourceObject->_invokeRequest($this->classInvoker, $request);
22
    }
23
}
24