Completed
Push — master ( 98b65c...d629c6 )
by Jeroen De
121:01 queued 56:02
created

UrlGenerator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
declare( strict_types = 1 );
3
4
namespace WMDE\Fundraising\Frontend\App;
5
6
use Symfony\Bridge\Twig\Extension\RoutingExtension;
7
use WMDE\Fundraising\Frontend\Infrastructure\UrlGenerator as UrlGeneratorInterface;
8
9
class UrlGenerator implements UrlGeneratorInterface {
10
	private $routingExtension;
11
12
	public function __construct( RoutingExtension $routingExtension ) {
13
		$this->routingExtension = $routingExtension;
14
	}
15
16
	public function generateUrl( string $name, array $parameters = [] ): string {
17
		return $this->routingExtension->getUrl( $name, $parameters );
18
	}
19
}