Passed
Pull Request — 1.x (#78)
by Akihito
02:56 queued 01:49
created

DefaultRouteGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
ccs 5
cts 5
cp 1
rs 10
wmc 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ray\AuraSqlModule\Pagerfanta;
6
7
use Override;
8
9
final readonly class DefaultRouteGenerator implements RouteGeneratorInterface
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 9 at column 6
Loading history...
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