Skip to content
Permalink
Browse files

Clean up doc block.

Refs #10148
  • Loading branch information...
markstory committed Feb 1, 2017
1 parent 25cba6f commit 78da4e8d998f5b37ec6aae839550a17bd5a355fe
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/I18n/TranslatorFactory.php
@@ -17,7 +17,7 @@
use Aura\Intl\FormatterInterface;
use Aura\Intl\TranslatorFactory as BaseTranslatorFactory;
use Aura\Intl\TranslatorInterface;
use Cake\Core\Exception\Exception;
use RuntimeException;
/**
* Factory to create translators
@@ -35,14 +35,13 @@ class TranslatorFactory extends BaseTranslatorFactory
/**
* Returns a new Translator.
*
* @param string $locale The locale code for the translator.
* @param array $messages The localized messages for the translator.
* @param FormatterInterface $formatter The formatter to use for
* interpolating token values.
* @param TranslatorInterface $fallback A fallback translator to use, if
* any.
* @param \Aura\Intl\FormatterInterface $formatter The formatter to use for interpolating token values.
* @param \Aura\Intl\TranslatorInterface $fallback A fallback translator to use, if any.
* @throws \Cake\Core\Exception\Exception If fallback class does not match Cake\I18n\Translator
* @return Translator
* @return \Cake\I18n\Translator
*/
public function newInstance(
$locale,
@@ -52,7 +51,7 @@ public function newInstance(
) {
$class = $this->class;
if ($fallback !== null && get_class($fallback) !== $class) {
throw new Exception(sprintf(
throw new RuntimeException(sprintf(
'Translator fallback class %s does not match Cake\I18n\Translator, try clearing your _cake_core_ cache.',
get_class($fallback)
));

0 comments on commit 78da4e8

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