Skip to content

Commit

Permalink
Apply fixes from StyleCI (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmochine authored Mar 19, 2020
1 parent 88fa1ed commit 4a67285
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Dialect.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public function redirectUrl($url = null, string $locale = null)
if (Config::beautify() && Localization::fromUrl() === Config::fallbackLocale()) {
$parsed_url['host'] = $domain;
} else {
$parsed_url['host'] = tongue()->current() . '.' . $domain;
$parsed_url['host'] = tongue()->current().'.'.$domain;
}

if ($locale) {
$parsed_url['host'] = $locale . '.' . $domain;
$parsed_url['host'] = $locale.'.'.$domain;
}

return Accent::unparseUrl($parsed_url);
Expand Down Expand Up @@ -128,7 +128,7 @@ public function translateAll($excludeCurrentLocale = true)
public function translate($routeName, $routeAttributes = null, $locale = null)
{
// If no locale is given, we use the current locale
if (!$locale) {
if (! $locale) {
$locale = tongue()->current();
}

Expand Down Expand Up @@ -171,7 +171,7 @@ protected function addLocaleToHost($locale)
}

// Add locale to the host
return $locale . '.' . Url::domain();
return $locale.'.'.Url::domain();
}

/**
Expand All @@ -185,7 +185,7 @@ public function interpret($routeName)
{
$routePath = Accent::findRoutePathByName($routeName);

if (!isset($this->translatedRoutes[$routeName])) {
if (! isset($this->translatedRoutes[$routeName])) {
$this->translatedRoutes[$routeName] = $routePath;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Misc/DomainParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct()
}

/**
* https://github.com/jeremykendall/php-domain-parser
* https://github.com/jeremykendall/php-domain-parser.
*
* @param string $url
*
Expand Down
2 changes: 1 addition & 1 deletion src/Misc/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function domain(): string
*/
protected static function configDomainIsSet(): bool
{
if (!$domain = Config::domain()) {
if (! $domain = Config::domain()) {
return false;
} // config was not set

Expand Down

0 comments on commit 4a67285

Please sign in to comment.