x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Passed
Push — master ( 83b89e...48455b )
by Hannes
02:13
created

UrlGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A generateUrl() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace inroutephp\inroute\Runtime\Aura;
6
7
use inroutephp\inroute\Runtime\UrlGeneratorInterface;
8
use Aura\Router\Generator;
9
10
final class UrlGenerator implements UrlGeneratorInterface
11
{
12
    /**
13
     * @var Generator
14
     */
15
    private $generator;
16
17
    public function __construct(Generator $generator)
18
    {
19
        $this->generator = $generator;
20
    }
21
22
    public function generateUrl(string $name, array $values = []): string
23
    {
24
        return (string)$this->generator->generate($name, $values);
25
    }
26
}
27