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

UrlGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 11
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A generateUrl() 0 3 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
}