[2.3] More cs fixes
This commit is contained in:
parent
cef9972484
commit
b034b08506
@ -361,7 +361,7 @@ class FormValidatorTest extends AbstractConstraintValidatorTest
|
|||||||
$object = $this->getMock('\stdClass');
|
$object = $this->getMock('\stdClass');
|
||||||
$options = array('validation_groups' => function (FormInterface $form) {
|
$options = array('validation_groups' => function (FormInterface $form) {
|
||||||
return array('group1', 'group2');
|
return array('group1', 'group2');
|
||||||
},);
|
});
|
||||||
$form = $this->getBuilder('name', '\stdClass', $options)
|
$form = $this->getBuilder('name', '\stdClass', $options)
|
||||||
->setData($object)
|
->setData($object)
|
||||||
->getForm();
|
->getForm();
|
||||||
|
@ -52,7 +52,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->getSymbol($currency, $displayLocale);
|
return $this->getSymbol($currency, $displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->getName($currency, $displayLocale);
|
return $this->getName($currency, $displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->getNames($displayLocale);
|
return $this->getNames($displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
|||||||
try {
|
try {
|
||||||
return parent::getFractionDigits($currency);
|
return parent::getFractionDigits($currency);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
|||||||
try {
|
try {
|
||||||
return parent::getRoundingIncrement($currency);
|
return parent::getRoundingIncrement($currency);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->localeProvider->getLocales();
|
return $this->localeProvider->getLocales();
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->getName($language, $displayLocale);
|
return $this->getName($language, $displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->getNames($displayLocale);
|
return $this->getNames($displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->scriptProvider->getName($script, $displayLocale);
|
return $this->scriptProvider->getName($script, $displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->scriptProvider->getNames($displayLocale);
|
return $this->scriptProvider->getNames($displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
|
|||||||
try {
|
try {
|
||||||
return $this->localeProvider->getLocales();
|
return $this->localeProvider->getLocales();
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface
|
|||||||
try {
|
try {
|
||||||
return parent::getLocales();
|
return parent::getLocales();
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface
|
|||||||
try {
|
try {
|
||||||
return $this->getName($locale, $displayLocale);
|
return $this->getName($locale, $displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface
|
|||||||
try {
|
try {
|
||||||
return $this->getNames($displayLocale);
|
return $this->getNames($displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface
|
|||||||
try {
|
try {
|
||||||
return $this->getName($country, $displayLocale);
|
return $this->getName($country, $displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface
|
|||||||
try {
|
try {
|
||||||
return $this->getNames($displayLocale);
|
return $this->getNames($displayLocale);
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface
|
|||||||
try {
|
try {
|
||||||
return $this->localeProvider->getLocales();
|
return $this->localeProvider->getLocales();
|
||||||
} catch (MissingResourceException $e) {
|
} catch (MissingResourceException $e) {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,6 @@ foreach ($urls as $urlVersion => $url) {
|
|||||||
? $urlVersion
|
? $urlVersion
|
||||||
: $maxVersion;
|
: $maxVersion;
|
||||||
|
|
||||||
|
|
||||||
echo " $urlVersion\n";
|
echo " $urlVersion\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,13 +56,13 @@ class StopwatchTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$events = new \ReflectionProperty('Symfony\Component\Stopwatch\Section', 'events');
|
$events = new \ReflectionProperty('Symfony\Component\Stopwatch\Section', 'events');
|
||||||
$events->setAccessible(true);
|
$events->setAccessible(true);
|
||||||
$events->setValue(
|
|
||||||
end($section),
|
$stopwatchMockEvent = $this->getMockBuilder('Symfony\Component\Stopwatch\StopwatchEvent')
|
||||||
array(
|
->setConstructorArgs(array(microtime(true) * 1000))
|
||||||
'foo' => $this->getMockBuilder('Symfony\Component\Stopwatch\StopwatchEvent')
|
->getMock()
|
||||||
->setConstructorArgs(array(microtime(true) * 1000))
|
;
|
||||||
->getMock())
|
|
||||||
);
|
$events->setValue(end($section), array('foo' => $stopwatchMockEvent));
|
||||||
|
|
||||||
$this->assertFalse($stopwatch->isStarted('foo'));
|
$this->assertFalse($stopwatch->isStarted('foo'));
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class ChoiceValidatorTest extends AbstractConstraintValidatorTest
|
|||||||
{
|
{
|
||||||
$constraint = new Choice(array('callback' => function () {
|
$constraint = new Choice(array('callback' => function () {
|
||||||
return array('foo', 'bar');
|
return array('foo', 'bar');
|
||||||
}, ));
|
}));
|
||||||
|
|
||||||
$this->validator->validate('bar', $constraint);
|
$this->validator->validate('bar', $constraint);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user