summaryrefslogtreecommitdiff
path: root/vendor/symfony/polyfill-php72/Php72.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/polyfill-php72/Php72.php')
-rw-r--r--vendor/symfony/polyfill-php72/Php72.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/symfony/polyfill-php72/Php72.php b/vendor/symfony/polyfill-php72/Php72.php
index 1e36d5e62b..2b706d42be 100644
--- a/vendor/symfony/polyfill-php72/Php72.php
+++ b/vendor/symfony/polyfill-php72/Php72.php
@@ -73,7 +73,7 @@ final class Php72
return 'Windows';
}
- $map = array(
+ $map = [
'Darwin' => 'Darwin',
'DragonFly' => 'BSD',
'FreeBSD' => 'BSD',
@@ -81,9 +81,9 @@ final class Php72
'OpenBSD' => 'BSD',
'Linux' => 'Linux',
'SunOS' => 'Solaris',
- );
+ ];
- return isset($map[PHP_OS]) ? $map[PHP_OS] : 'Unknown';
+ return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown';
}
public static function spl_object_id($object)
@@ -102,7 +102,7 @@ final class Php72
public static function sapi_windows_vt100_support($stream, $enable = null)
{
if (!\is_resource($stream)) {
- trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', E_USER_WARNING);
+ trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
return false;
}
@@ -110,7 +110,7 @@ final class Php72
$meta = stream_get_meta_data($stream);
if ('STDIO' !== $meta['stream_type']) {
- trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', E_USER_WARNING);
+ trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING);
return false;
}
@@ -134,7 +134,7 @@ final class Php72
public static function stream_isatty($stream)
{
if (!\is_resource($stream)) {
- trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', E_USER_WARNING);
+ trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
return false;
}
@@ -150,12 +150,12 @@ final class Php72
private static function initHashMask()
{
- $obj = (object) array();
+ $obj = (object) [];
self::$hashMask = -1;
// check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
- $obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush');
- foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) {
+ $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'];
+ foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) {
if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) {
$frame['line'] = 0;
break;