Skip to content
Permalink
Browse files

fix phpcs

  • Loading branch information...
markstory committed Jan 10, 2017
1 parent 0c4ae66 commit 4f7942b86980a43d12dda0d7a90d3d1e07aff185
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/I18n/Translator.php
@@ -20,8 +20,8 @@
*/
namespace Cake\I18n;
use Aura\Intl\TranslatorInterface;
use Aura\Intl\FormatterInterface;
use Aura\Intl\TranslatorInterface;
/**
* Provides missing message behavior for CakePHP internal message formats.
@@ -72,10 +72,10 @@ public function __construct(
FormatterInterface $formatter,
TranslatorInterface $fallback = null
) {
$this->locale = $locale;
$this->messages = $messages;
$this->locale = $locale;
$this->messages = $messages;
$this->formatter = $formatter;
$this->fallback = $fallback;
$this->fallback = $fallback;
}
/**
@@ -129,7 +129,7 @@ public function translate($key, array $tokensValues = [])
// No or missing context, fallback to the key/first message
if ($context === null) {
$message = current($message['_context']);
} elseif(!isset($message['_context'][$context])) {
} elseif (!isset($message['_context'][$context])) {
$message = $key;
} elseif (!isset($message['_context'][$context])) {
$message = $key;
@@ -143,6 +143,7 @@ public function translate($key, array $tokensValues = [])
if (is_array($message)) {
return array_values($message + [''])[0];
}
return $message;
}

0 comments on commit 4f7942b

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