Passed
Push — master ( 83b89e...48455b )
by Hannes
02:13
created

UrlGenerator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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