Skip to content

Commit

Permalink
UHF-11176: Fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremysteerio committed Dec 18, 2024
1 parent 63aa34b commit 2f0d9d0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions public/modules/custom/helfi_etusivu/src/Servicemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Drupal\Component\Utility\Xss;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Url;
use Drupal\helfi_etusivu\Enum\ServiceMapLink;
Expand All @@ -19,6 +20,8 @@
*/
final class Servicemap {

use StringTranslationTrait;

/**
* API URL for querying data.
*
Expand All @@ -32,7 +35,6 @@ final class Servicemap {
*/
private const SITE_URL = 'https://kartta.hel.fi/';


/**
* Gets the address label for a given service map link.
*
Expand All @@ -44,13 +46,12 @@ final class Servicemap {
* @return \Drupal\Core\StringTranslation\TranslatableMarkup
* The address label corresponding to the service map link.
*/

private function getAddressLabel(ServiceMapLink $link, string $address) : TranslatableMarkup {
return match($link) {
ServiceMapLink::ROADWORK_EVENTS => t('Street works and events near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
ServiceMapLink::CITYBIKE_STATIONS_STANDS => t('City bike stations and bicycle racks near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
ServiceMapLink::STREET_PARK_PROJECTS => t('Street and park projects near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
ServiceMapLink::PLANS_IN_PROCESS => t('Plans under preparation near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
ServiceMapLink::ROADWORK_EVENTS => $this->t('Street works and events near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
ServiceMapLink::CITYBIKE_STATIONS_STANDS => $this->t('City bike stations and bicycle racks near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
ServiceMapLink::STREET_PARK_PROJECTS => $this->t('Street and park projects near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
ServiceMapLink::PLANS_IN_PROCESS => $this->t('Plans under preparation near the address @address', ['@address' => $address], ['context' => 'Helsinki near you address label']),
};
}

Expand Down

0 comments on commit 2f0d9d0

Please sign in to comment.