RouteStubResolver::resolve()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lit\Voltage;
6
7
use Lit\Voltage\Interfaces\RouterStubResolverInterface;
8
use Psr\Http\Server\RequestHandlerInterface;
9
10
/**
11
 * Basic router stub resolver that do nothing but just use stub itself as request handler.
12
 */
13
class RouteStubResolver implements RouterStubResolverInterface
14
{
15
    /**
16
     * @param mixed $stub The stub value to be resolved.
17
     * @return RequestHandlerInterface
18
     */
19
    public function resolve($stub): RequestHandlerInterface
20
    {
21
        return $stub;
22
    }
23
}
24