[ExpressionLanguage] Fix PhpDoc type-hints on Token value
Also added tests to cover number parser BC
This commit is contained in:
parent
6fe8435c6f
commit
18f0fc594d
|
@ -116,6 +116,14 @@ class ExpressionLanguageTest extends TestCase
|
|||
$this->assertSame('($a + $B)', $result);
|
||||
}
|
||||
|
||||
public function testStrictEquality()
|
||||
{
|
||||
$expressionLanguage = new ExpressionLanguage();
|
||||
$expression = '123 === a';
|
||||
$result = $expressionLanguage->compile($expression, array('a'));
|
||||
$this->assertSame('(123 === $a)', $result);
|
||||
}
|
||||
|
||||
public function testCachingWithDifferentNamesOrder()
|
||||
{
|
||||
$cacheMock = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface')->getMock();
|
||||
|
|
|
@ -30,9 +30,9 @@ class Token
|
|||
const PUNCTUATION_TYPE = 'punctuation';
|
||||
|
||||
/**
|
||||
* @param string $type The type of the token (self::*_TYPE)
|
||||
* @param string $value The token value
|
||||
* @param int $cursor The cursor position in the source
|
||||
* @param string $type The type of the token (self::*_TYPE)
|
||||
* @param string|int|float|null $value The token value
|
||||
* @param int $cursor The cursor position in the source
|
||||
*/
|
||||
public function __construct($type, $value, $cursor)
|
||||
{
|
||||
|
|
Reference in New Issue