Skip to content

Commit

Permalink
Apply PSR-2 coding style & improve readability :)
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 committed Jun 26, 2020
1 parent 1ca347d commit 02c1a9c
Showing 1 changed file with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,40 @@ private function whatApi()
{
switch ($this->sApi) {
case self::FB_PROVIDER:
if (!$this->config->values['module.api']['facebook.enabled']) continue;
if (!$this->config->values['module.api']['facebook.enabled']) {
continue;
}

$this->sUrl = new Facebook;
break;

case self::GOOGLE_PROVIDER:
if (!$this->config->values['module.api']['google.enabled']) continue;
if (!$this->config->values['module.api']['google.enabled']) {
continue;
}

$this->sUrl = new Google($this->session, $this->httpRequest, $this->registry);
break;

case self::TWITTER_PROVIDER:
if (!$this->config->values['module.api']['twitter.enabled']) continue;
if (!$this->config->values['module.api']['twitter.enabled']) {
continue;
}

$this->sUrl = new Twitter;
break;

case self::MICROSOFT_PROVIDER:
if (!$this->config->values['module.api']['microsoft.enabled']) continue;
if (!$this->config->values['module.api']['microsoft.enabled']) {
continue;
}

$this->sUrl = new Microsoft;
break;

default:
$this->displayPageNotFound(
t('The %0% API is incorrect.',
$this->sApi)
t('The %0% API is incorrect.', $this->sApi)
);
}
}
Expand Down

0 comments on commit 02c1a9c

Please sign in to comment.