Completed
Push — 1.x ( 249f8e...9ce618 )
by Akihito
11s
created

DefaultRouteGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A __invoke() 0 4 1
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