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

Commit

Permalink
Merge branch 'master' into acceptHandling
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Http/Header/AbstractAccept.php
	library/Zend/Http/Header/AcceptEncoding.php
	library/Zend/Http/Header/AcceptLanguage.php
	tests/Zend/Http/Header/AcceptCharsetTest.php
	tests/Zend/Http/Header/AcceptEncodingTest.php
	tests/Zend/Http/Header/AcceptLanguageTest.php
	tests/Zend/Http/Header/AcceptTest.php
  • Loading branch information
Freeaqingme committed Jul 14, 2012
5 parents 9932ccb + df6a706 + a82fc82 + 7c2a059 + 4fefb53 commit 599ee3a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 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
4 changes: 2 additions & 2 deletions test/Filter/NumberFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function testFormattedToNumber($locale, $style, $type, $value, $expected)
$this->assertEquals($expected, $filter->filter($value));
}

static public function numberToFormattedProvider()
public static function numberToFormattedProvider()
{
return array(
array(
Expand All @@ -91,7 +91,7 @@ static public function numberToFormattedProvider()
);
}

static public function formattedToNumberProvider()
public static function formattedToNumberProvider()
{
return array(
array(
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 599ee3a

Please sign in to comment.