Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18f0fc5

Browse files
mcg-webJeremiah VALERIE
authored and
Jeremiah VALERIE
committed
[ExpressionLanguage] Fix PhpDoc type-hints on Token value
Also added tests to cover number parser BC
1 parent6fe8435 commit18f0fc5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

‎src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ public function testCachingForOverriddenVariableNames()
116116
$this->assertSame('($a + $B)',$result);
117117
}
118118

119+
publicfunctiontestStrictEquality()
120+
{
121+
$expressionLanguage =newExpressionLanguage();
122+
$expression ='123 === a';
123+
$result =$expressionLanguage->compile($expression,array('a'));
124+
$this->assertSame('(123 === $a)',$result);
125+
}
126+
119127
publicfunctiontestCachingWithDifferentNamesOrder()
120128
{
121129
$cacheMock =$this->getMockBuilder('Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface')->getMock();

‎src/Symfony/Component/ExpressionLanguage/Token.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class Token
3030
constPUNCTUATION_TYPE ='punctuation';
3131

3232
/**
33-
* @param string $type The type of the token (self::*_TYPE)
34-
* @param string $value The token value
35-
* @param int $cursor The cursor position in the source
33+
* @param string$type The type of the token (self::*_TYPE)
34+
* @param string|int|float|null $value The token value
35+
* @param int$cursor The cursor position in the source
3636
*/
3737
publicfunction__construct($type,$value,$cursor)
3838
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp