Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | 2 | public function getWikiText( string $title, LatLongValue $latLong, array $properties ): string { |
|
20 | $segments = [ |
||
21 | 2 | $this->templateName, |
|
22 | 2 | 'title=' . $title, |
|
23 | 2 | 'latitude=' . $latLong->getLatitude(), |
|
24 | 2 | 'longitude=' . $latLong->getLongitude(), |
|
25 | 2 | 'userparam=' . $this->extraParameter |
|
26 | ]; |
||
27 | |||
28 | 2 | foreach ( $properties as $name => $value ) { |
|
29 | 1 | $segments[] = $name . '=' . $value; |
|
30 | 1 | $segments[] = $value; |
|
31 | } |
||
32 | |||
33 | 2 | return '{{' . implode( '|', $segments ) . '}}'; |
|
34 | } |
||
35 | |||
37 |