Passed
Pull Request — 1.x (#88)
by Akihito
01:23
created

DefaultRouteGenerator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
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 2
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ray\AuraSqlModule\Pagerfanta;
6
7
use Override;
8
9
final class DefaultRouteGenerator implements RouteGeneratorInterface
10
{
11
    public function __construct(private string $uri)
12
    {
13 6
    }
14
15 6
    /**
16 6
     * {@inheritDoc}
17
     */
18 4
    #[Override]
19
    public function __invoke($page)
20 4
    {
21
        return uri_template($this->uri, ['page' => $page]);
22
    }
23
}
24