Skip to content

Commit

Permalink
Merge pull request #16 from Astrotomic/fix-locales-return-type
Browse files Browse the repository at this point in the history
add missing return type-hints
  • Loading branch information
Gummibeer authored Jun 24, 2019
2 parents 055b38b + 81363ad commit 69f8bd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Translatable/Locales.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function all(): array
return array_values($this->locales);
}

public function current()
public function current(): string
{
return $this->config->get('translatable.locale') ?: $this->translator->getLocale();
}
Expand Down Expand Up @@ -115,7 +115,7 @@ public function offsetGet($key): ?string
return $this->get($key);
}

public function offsetSet($key, $value)
public function offsetSet($key, $value): void
{
if (is_string($key) && is_string($value)) {
$this->add($this->getCountryLocale($key, $value));
Expand All @@ -124,7 +124,7 @@ public function offsetSet($key, $value)
}
}

public function offsetUnset($key)
public function offsetUnset($key): void
{
$this->forget($key);
}
Expand Down

0 comments on commit 69f8bd7

Please sign in to comment.