Skip to content

Commit e16e66c

Browse files
Merge branch '4.4' into 5.1
* 4.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents 6675d93 + 54b118a commit e16e66c

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
@@ -109,14 +109,14 @@ public function string(string $value)
109109
public function repr($value)
110110
{
111111
if (\is_int($value) || \is_float($value)) {
112-
if (false !== $locale = setlocale(LC_NUMERIC, 0)) {
113-
setlocale(LC_NUMERIC, 'C');
112+
if (false !== $locale = setlocale(\LC_NUMERIC, 0)) {
113+
setlocale(\LC_NUMERIC, 'C');
114114
}
115115

116116
$this->raw($value);
117117

118118
if (false !== $locale) {
119-
setlocale(LC_NUMERIC, $locale);
119+
setlocale(\LC_NUMERIC, $locale);
120120
}
121121
} elseif (null === $value) {
122122
$this->raw('null');

Lexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function tokenize(string $expression)
4343
if (preg_match('/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A', $expression, $match, 0, $cursor)) {
4444
// numbers
4545
$number = (float) $match[0]; // floats
46-
if (preg_match('/^[0-9]+$/', $match[0]) && $number <= PHP_INT_MAX) {
46+
if (preg_match('/^[0-9]+$/', $match[0]) && $number <= \PHP_INT_MAX) {
4747
$number = (int) $match[0]; // integers lower than the maximum
4848
}
4949
$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)