Skip to content
Permalink
Browse files

Doc block types.

  • Loading branch information...
dereuromark committed Jan 11, 2017
1 parent 924a06a commit 4f01eafbf0a19c7e1936583e1845919a42dae1ff
Showing with 4 additions and 3 deletions.
  1. +2 −2 src/I18n/Translator.php
  2. +2 −1 src/I18n/TranslatorRegistry.php
@@ -64,7 +64,7 @@ class Translator implements TranslatorInterface
* @param string $locale The locale being used.
* @param array $messages The message keys and translations.
* @param \Aura\Intl\FormatterInterface $formatter A message formatter.
* @param \Aura\Intl\TranslatorInterface $fallback A fallback translator.
* @param \Aura\Intl\TranslatorInterface|null $fallback A fallback translator.
*/
public function __construct(
$locale,
@@ -82,7 +82,7 @@ public function __construct(
* Gets the message translation by its key.
*
* @param string $key The message key.
* @return mixed The message translation string, or false if not found.
* @return string|bool The message translation string, or false if not found.
*/
protected function getMessage($key)
{
@@ -76,7 +76,7 @@ public function setCacher(CacheEngine $cacher)
* @param string $name The translator package to retrieve.
* @param string|null $locale The locale to use; if empty, uses the default
* locale.
* @return \Aura\Intl\TranslatorInterface A translator object.
* @return \Aura\Intl\TranslatorInterface|null A translator object.
* @throws \Aura\Intl\Exception If no translator with that name could be found
* for the given locale.
*/
@@ -255,6 +255,7 @@ public function setLoaderFallback($name, callable $loader)
return $loader;
}
$loader = function () use ($loader, $fallbackDomain) {
/* @var \Aura\Intl\Package $package */
$package = $loader();
if (!$package->getFallback()) {
$package->setFallback($fallbackDomain);

0 comments on commit 4f01eaf

Please sign in to comment.
You can’t perform that action at this time.