This commit is contained in:
Fabien Potencier 2017-05-07 09:11:44 -07:00
parent ae3d88c215
commit a23330bf1e
11 changed files with 16 additions and 18 deletions

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;

View File

@ -32,18 +32,18 @@ EOF
array('%count%' => 10)
) ?>
<?php echo $view['translator']->trans('other-domain-test-no-params-short-array', [], 'not_messages'); ?>
<?php echo $view['translator']->trans('other-domain-test-no-params-short-array', array(), 'not_messages'); ?>
<?php echo $view['translator']->trans('other-domain-test-no-params-long-array', array(), 'not_messages'); ?>
<?php echo $view['translator']->trans('other-domain-test-params-short-array', ['foo' => 'bar'], 'not_messages'); ?>
<?php echo $view['translator']->trans('other-domain-test-params-short-array', array('foo' => 'bar'), 'not_messages'); ?>
<?php echo $view['translator']->trans('other-domain-test-params-long-array', array('foo' => 'bar'), 'not_messages'); ?>
<?php echo $view['translator']->transChoice('other-domain-test-trans-choice-short-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?>
<?php echo $view['translator']->transChoice('other-domain-test-trans-choice-short-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?>
<?php echo $view['translator']->transChoice('other-domain-test-trans-choice-long-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?>
<?php echo $view['translator']->trans('typecast', ['a' => (int) '123'], 'not_messages'); ?>
<?php echo $view['translator']->transChoice('msg1', 10 + 1, [], 'not_messages'); ?>
<?php echo $view['translator']->transChoice('msg2', ceil(4.5), [], 'not_messages'); ?>
<?php echo $view['translator']->trans('typecast', array('a' => (int) '123'), 'not_messages'); ?>
<?php echo $view['translator']->transChoice('msg1', 10 + 1, array(), 'not_messages'); ?>
<?php echo $view['translator']->transChoice('msg2', ceil(4.5), array(), 'not_messages'); ?>

View File

@ -149,7 +149,7 @@ class Table
*/
public function setColumnStyle($columnIndex, $name)
{
$columnIndex = intval($columnIndex);
$columnIndex = (int) $columnIndex;
$this->columnStyles[$columnIndex] = $this->resolveStyle($name);

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Form\Tests\Extension\Csrf\EventListener;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\Extension\Csrf\EventListener\CsrfValidationListener;

View File

@ -1008,7 +1008,7 @@ class RequestTest extends TestCase
$req = new Request(array(), array(), array(), array(), array(), array(), 'MyContent');
$resource = $req->getContent(true);
$this->assertTrue(is_resource($resource));
$this->assertInternalType('resource', $resource);
$this->assertEquals('MyContent', stream_get_contents($resource));
}

View File

@ -676,7 +676,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
*/
public function testGetFractionDigits($currency)
{
$this->assertTrue(is_numeric($this->dataProvider->getFractionDigits($currency)));
$this->assertInternalType('numeric', $this->dataProvider->getFractionDigits($currency));
}
/**
@ -684,7 +684,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
*/
public function testGetRoundingIncrement($currency)
{
$this->assertTrue(is_numeric($this->dataProvider->getRoundingIncrement($currency)));
$this->assertInternalType('numeric', $this->dataProvider->getRoundingIncrement($currency));
}
public function provideCurrenciesWithNumericEquivalent()

View File

@ -725,8 +725,8 @@ class ProcessTest extends TestCase
// Ensure that both processed finished and the output is numeric
$this->assertFalse($process1->isRunning());
$this->assertFalse($process2->isRunning());
$this->assertTrue(is_numeric($process1->getOutput()));
$this->assertTrue(is_numeric($process2->getOutput()));
$this->assertInternalType('numeric', $process1->getOutput());
$this->assertInternalType('numeric', $process2->getOutput());
// Ensure that restart returned a new process by check that the output is different
$this->assertNotEquals($process1->getOutput(), $process2->getOutput());

View File

@ -51,7 +51,7 @@ class AnonymousToken extends AbstractToken
*/
public function getKey()
{
@trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
@trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
return $this->getSecret();
}

View File

@ -78,7 +78,7 @@ class RememberMeToken extends AbstractToken
*/
public function getKey()
{
@trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
@trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
return $this->getSecret();
}

View File

@ -69,7 +69,7 @@ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterfac
*/
public function getKey()
{
@trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
@trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
return $this->getSecret();
}

View File

@ -89,7 +89,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
*/
public function getKey()
{
@trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
@trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
return $this->getSecret();
}