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

UrlGeneratorAdapter::generateUrl()   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 2
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
}