Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
[PSR-2] fixers=braces,elseif,short_tag,php_closing_tag,trailing_space…
Browse files Browse the repository at this point in the history
…s,linefeed

Applied php-cs-fixer --fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed
  • Loading branch information
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/Translator/LoaderPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Plugin manager implementation for translation loaders.
*
* Enforces that filters retrieved are either callbacks or instances of
* Loader\LoaderInterface. Additionally, it registers a number of default
* Loader\LoaderInterface. Additionally, it registers a number of default
* loaders.
*
* @category Zend
Expand All @@ -28,7 +28,7 @@ class LoaderPluginManager extends AbstractPluginManager
{
/**
* Default set of loaders
*
*
* @var array
*/
protected $invokableClasses = array(
Expand All @@ -40,8 +40,8 @@ class LoaderPluginManager extends AbstractPluginManager
* Validate the plugin
*
* Checks that the filter loaded is an instance of Loader\LoaderInterface.
*
* @param mixed $plugin
*
* @param mixed $plugin
* @return void
* @throws Exception\RuntimeException if invalid
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Translator/TextDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class TextDomain extends ArrayObject

/**
* Set the plural rule
*
* @param PluralRule $rule
*
* @param PluralRule $rule
* @return TextDomain
*/
public function setPluralRule(PluralRule $rule)
Expand Down
20 changes: 10 additions & 10 deletions src/Translator/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ public function getCache()

/**
* Set the plugin manager for translation loaders
*
* @param LoaderPluginManager $pluginManager
*
* @param LoaderPluginManager $pluginManager
* @return Translator
*/
public function setPluginManager(LoaderPluginManager $pluginManager)
Expand Down Expand Up @@ -288,9 +288,9 @@ public function translate($message, $textDomain = 'default', $locale = null)

if ($translation !== null && $translation !== '') {
return $translation;
}
if (null !== ($fallbackLocale = $this->getFallbackLocale())
}

if (null !== ($fallbackLocale = $this->getFallbackLocale())
&& $locale !== $fallbackLocale
) {
return $this->translate($message, $textDomain, $fallbackLocale);
Expand Down Expand Up @@ -321,14 +321,14 @@ public function translatePlural(
$translation = $this->getTranslatedMessage($singular, $locale, $textDomain);

if ($translation === null || $translation === '') {
if (null !== ($fallbackLocale = $this->getFallbackLocale())
if (null !== ($fallbackLocale = $this->getFallbackLocale())
&& $locale !== $fallbackLocale
) {
return $this->translatePlural(
$singular,
$plural,
$number,
$textDomain,
$singular,
$plural,
$number,
$textDomain,
$fallbackLocale
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/View/Helper/TranslatePlural.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public function setTranslator(Translator $translator)
* @throws Exception\RuntimeException
*/
public function __invoke(
$singular,
$plural,
$singular,
$plural,
$number,
$textDomain = 'default',
$textDomain = 'default',
$locale = null
) {
if ($this->translator === null) {
Expand Down
2 changes: 1 addition & 1 deletion test/Translator/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function testTranslate()
$loader->textDomain = new TextDomain(array('foo' => 'bar'));
$this->translator->getPluginManager()->setService('test', $loader);
$this->translator->addTranslationFile('test', null);

$this->assertEquals('bar', $this->translator->translate('foo'));
}

Expand Down

0 comments on commit 7c2a059

Please sign in to comment.