@@ -73,17 +73,17 @@ public static function php_os_family()
73
73
return 'Windows ' ;
74
74
}
75
75
76
- $ map = array (
76
+ $ map = [
77
77
'Darwin ' => 'Darwin ' ,
78
78
'DragonFly ' => 'BSD ' ,
79
79
'FreeBSD ' => 'BSD ' ,
80
80
'NetBSD ' => 'BSD ' ,
81
81
'OpenBSD ' => 'BSD ' ,
82
82
'Linux ' => 'Linux ' ,
83
83
'SunOS ' => 'Solaris ' ,
84
- ) ;
84
+ ] ;
85
85
86
- return isset ($ map [PHP_OS ]) ? $ map [PHP_OS ] : 'Unknown ' ;
86
+ return isset ($ map [\ PHP_OS ]) ? $ map [\ PHP_OS ] : 'Unknown ' ;
87
87
}
88
88
89
89
public static function spl_object_id ($ object )
@@ -102,15 +102,15 @@ public static function spl_object_id($object)
102
102
public static function sapi_windows_vt100_support ($ stream , $ enable = null )
103
103
{
104
104
if (!\is_resource ($ stream )) {
105
- trigger_error ('sapi_windows_vt100_support() expects parameter 1 to be resource, ' .\gettype ($ stream ).' given ' , E_USER_WARNING );
105
+ trigger_error ('sapi_windows_vt100_support() expects parameter 1 to be resource, ' .\gettype ($ stream ).' given ' , \ E_USER_WARNING );
106
106
107
107
return false ;
108
108
}
109
109
110
110
$ meta = stream_get_meta_data ($ stream );
111
111
112
112
if ('STDIO ' !== $ meta ['stream_type ' ]) {
113
- trigger_error ('sapi_windows_vt100_support() was not able to analyze the specified stream ' , E_USER_WARNING );
113
+ trigger_error ('sapi_windows_vt100_support() was not able to analyze the specified stream ' , \ E_USER_WARNING );
114
114
115
115
return false ;
116
116
}
@@ -134,7 +134,7 @@ public static function sapi_windows_vt100_support($stream, $enable = null)
134
134
public static function stream_isatty ($ stream )
135
135
{
136
136
if (!\is_resource ($ stream )) {
137
- trigger_error ('stream_isatty() expects parameter 1 to be resource, ' .\gettype ($ stream ).' given ' , E_USER_WARNING );
137
+ trigger_error ('stream_isatty() expects parameter 1 to be resource, ' .\gettype ($ stream ).' given ' , \ E_USER_WARNING );
138
138
139
139
return false ;
140
140
}
@@ -150,12 +150,12 @@ public static function stream_isatty($stream)
150
150
151
151
private static function initHashMask ()
152
152
{
153
- $ obj = (object ) array () ;
153
+ $ obj = (object ) [] ;
154
154
self ::$ hashMask = -1 ;
155
155
156
156
// check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
157
- $ obFuncs = array ( 'ob_clean ' , 'ob_end_clean ' , 'ob_flush ' , 'ob_end_flush ' , 'ob_get_contents ' , 'ob_get_flush ' ) ;
158
- foreach (debug_backtrace (\PHP_VERSION_ID >= 50400 ? DEBUG_BACKTRACE_IGNORE_ARGS : false ) as $ frame ) {
157
+ $ obFuncs = [ 'ob_clean ' , 'ob_end_clean ' , 'ob_flush ' , 'ob_end_flush ' , 'ob_get_contents ' , 'ob_get_flush ' ] ;
158
+ foreach (debug_backtrace (\PHP_VERSION_ID >= 50400 ? \ DEBUG_BACKTRACE_IGNORE_ARGS : false ) as $ frame ) {
159
159
if (isset ($ frame ['function ' ][0 ]) && !isset ($ frame ['class ' ]) && 'o ' === $ frame ['function ' ][0 ] && \in_array ($ frame ['function ' ], $ obFuncs )) {
160
160
$ frame ['line ' ] = 0 ;
161
161
break ;
0 commit comments