Skip to content

Commit d035ca0

Browse files
Merge branch '4.4' into 5.1
* 4.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents b6886c4 + 2b39472 commit d035ca0

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

Collator/Collator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public static function create(?string $locale)
109109
public function asort(array &$array, int $sortFlag = self::SORT_REGULAR)
110110
{
111111
$intlToPlainFlagMap = [
112-
self::SORT_REGULAR => SORT_REGULAR,
113-
self::SORT_NUMERIC => SORT_NUMERIC,
114-
self::SORT_STRING => SORT_STRING,
112+
self::SORT_REGULAR => \SORT_REGULAR,
113+
self::SORT_NUMERIC => \SORT_NUMERIC,
114+
self::SORT_STRING => \SORT_STRING,
115115
];
116116

117117
$plainSortFlag = isset($intlToPlainFlagMap[$sortFlag]) ? $intlToPlainFlagMap[$sortFlag] : self::SORT_REGULAR;

Data/Bundle/Writer/JsonBundleWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function write(string $path, string $locale, $data)
3535
}
3636
});
3737

38-
$contents = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n";
38+
$contents = json_encode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE)."\n";
3939

4040
file_put_contents($path.'/'.$locale.'.json', $contents);
4141
}

Data/Generator/LocaleDataGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function preGenerate()
6767
// Write parents locale file for the Translation component
6868
file_put_contents(
6969
__DIR__.'/../../../Translation/Resources/data/parents.json',
70-
json_encode($this->localeParents, JSON_PRETTY_PRINT).PHP_EOL
70+
json_encode($this->localeParents, \JSON_PRETTY_PRINT).\PHP_EOL
7171
);
7272
}
7373

Data/Util/LocaleScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class LocaleScanner
4040
*/
4141
public function scanLocales(string $sourceDir): array
4242
{
43-
$locales = glob($sourceDir.'/*.txt', GLOB_NOSORT);
43+
$locales = glob($sourceDir.'/*.txt', \GLOB_NOSORT);
4444

4545
// Remove file extension and sort
4646
array_walk($locales, function (&$locale) { $locale = basename($locale, '.txt'); });

DateFormatter/DateFormat/Transformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ abstract public function extractDateOptions(string $matched, int $length): array
6060
*/
6161
protected function padLeft(string $value, int $length): string
6262
{
63-
return str_pad($value, $length, '0', STR_PAD_LEFT);
63+
return str_pad($value, $length, '0', \STR_PAD_LEFT);
6464
}
6565
}

Intl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static function getIcuVersion(): ?string
8585
if (!self::isExtensionLoaded()) {
8686
self::$icuVersion = self::getIcuStubVersion();
8787
} elseif (\defined('INTL_ICU_VERSION')) {
88-
self::$icuVersion = INTL_ICU_VERSION;
88+
self::$icuVersion = \INTL_ICU_VERSION;
8989
} else {
9090
try {
9191
$reflector = new \ReflectionExtension('intl');

NumberFormatter/NumberFormatter.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ abstract class NumberFormatter
201201
* @see https://php.net/round
202202
*/
203203
private static $phpRoundingMap = [
204-
self::ROUND_HALFDOWN => PHP_ROUND_HALF_DOWN,
205-
self::ROUND_HALFEVEN => PHP_ROUND_HALF_EVEN,
206-
self::ROUND_HALFUP => PHP_ROUND_HALF_UP,
204+
self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN,
205+
self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN,
206+
self::ROUND_HALFUP => \PHP_ROUND_HALF_UP,
207207
];
208208

209209
/**
@@ -354,7 +354,7 @@ public function format($value, int $type = self::TYPE_DEFAULT)
354354
{
355355
// The original NumberFormatter does not support this format type
356356
if (self::TYPE_CURRENCY === $type) {
357-
trigger_error(__METHOD__.'(): Unsupported format type '.$type, E_USER_WARNING);
357+
trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
358358

359359
return false;
360360
}
@@ -508,7 +508,7 @@ public function parseCurrency(string $value, string &$currency, int &$position =
508508
public function parse(string $value, int $type = self::TYPE_DOUBLE, int &$position = 0)
509509
{
510510
if (self::TYPE_DEFAULT === $type || self::TYPE_CURRENCY === $type) {
511-
trigger_error(__METHOD__.'(): Unsupported format type '.$type, E_USER_WARNING);
511+
trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
512512

513513
return false;
514514
}

Resources/bin/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function get_icu_version_from_genrb($genrb)
6868
return $matches[1];
6969
}
7070

71-
error_reporting(E_ALL);
71+
error_reporting(\E_ALL);
7272

7373
set_error_handler(function ($type, $msg, $file, $line) {
7474
throw new \ErrorException($msg, 0, $type, $file, $line);

0 commit comments

Comments
 (0)