Completed
Pull Request — master (#1130)
by Jeroen De
117:50 queued 52:50
created

UrlGeneratorAdapter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 13
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\Component\Routing\Generator\UrlGeneratorInterface;
7
use WMDE\Fundraising\Frontend\Infrastructure\UrlGenerator;
8
9
class UrlGeneratorAdapter implements UrlGenerator {
10
11
	private $urlGenerator;
12
13
	public function __construct( UrlGeneratorInterface $urlGenerator ) {
14
		$this->urlGenerator = $urlGenerator;
15
	}
16
17
	public function generateUrl( string $name, array $parameters = [] ): string {
18
		return $this->urlGenerator->generate( $name, $parameters );
19
	}
20
21
}