Skip to content

Commit 54b118a

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents 89f0e2c + a993849 commit 54b118a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Compiler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ public function string($value)
113113
public function repr($value)
114114
{
115115
if (\is_int($value) || \is_float($value)) {
116-
if (false !== $locale = setlocale(LC_NUMERIC, 0)) {
117-
setlocale(LC_NUMERIC, 'C');
116+
if (false !== $locale = setlocale(\LC_NUMERIC, 0)) {
117+
setlocale(\LC_NUMERIC, 'C');
118118
}
119119

120120
$this->raw($value);
121121

122122
if (false !== $locale) {
123-
setlocale(LC_NUMERIC, $locale);
123+
setlocale(\LC_NUMERIC, $locale);
124124
}
125125
} elseif (null === $value) {
126126
$this->raw('null');

Lexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function tokenize($expression)
4545
if (preg_match('/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A', $expression, $match, 0, $cursor)) {
4646
// numbers
4747
$number = (float) $match[0]; // floats
48-
if (preg_match('/^[0-9]+$/', $match[0]) && $number <= PHP_INT_MAX) {
48+
if (preg_match('/^[0-9]+$/', $match[0]) && $number <= \PHP_INT_MAX) {
4949
$number = (int) $match[0]; // integers lower than the maximum
5050
}
5151
$tokens[] = new Token(Token::NUMBER_TYPE, $number, $cursor + 1);

SyntaxError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(string $message, int $cursor = 0, string $expression
2222
$message .= '.';
2323

2424
if (null !== $subject && null !== $proposals) {
25-
$minScore = INF;
25+
$minScore = \INF;
2626
foreach ($proposals as $proposal) {
2727
$distance = levenshtein($subject, $proposal);
2828
if ($distance < $minScore) {

Tests/ExpressionLanguageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testCachedParse()
6666
public function testConstantFunction()
6767
{
6868
$expressionLanguage = new ExpressionLanguage();
69-
$this->assertEquals(PHP_VERSION, $expressionLanguage->evaluate('constant("PHP_VERSION")'));
69+
$this->assertEquals(\PHP_VERSION, $expressionLanguage->evaluate('constant("PHP_VERSION")'));
7070

7171
$expressionLanguage = new ExpressionLanguage();
7272
$this->assertEquals('\constant("PHP_VERSION")', $expressionLanguage->compile('constant("PHP_VERSION")'));

0 commit comments

Comments
 (0)