@@ -83,7 +83,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
83
83
$ prevRoot = getenv ('COMPOSER_ROOT_VERSION ' );
84
84
putenv ("COMPOSER_ROOT_VERSION= $ PHPUNIT_VERSION .99 " );
85
85
// --no-suggest is not in the list to keep compat with composer 1.0, which is shipped with Ubuntu 16.04LTS
86
- $ exit = proc_close (proc_open ("$ COMPOSER install --no-dev --prefer-dist --no-progress --ansi " , array () , $ p , getcwd (), null , array ( 'bypass_shell ' => true ) ));
86
+ $ exit = proc_close (proc_open ("$ COMPOSER install --no-dev --prefer-dist --no-progress --ansi " , [] , $ p , getcwd (), null , [ 'bypass_shell ' => true ] ));
87
87
putenv ('COMPOSER_ROOT_VERSION ' .(false !== $ prevRoot ? '= ' .$ prevRoot : '' ));
88
88
if ($ exit ) {
89
89
exit ($ exit );
@@ -116,9 +116,9 @@ EOPHP
116
116
}
117
117
118
118
global $ argv , $ argc ;
119
- $ argv = isset ($ _SERVER ['argv ' ]) ? $ _SERVER ['argv ' ] : array () ;
119
+ $ argv = isset ($ _SERVER ['argv ' ]) ? $ _SERVER ['argv ' ] : [] ;
120
120
$ argc = isset ($ _SERVER ['argc ' ]) ? $ _SERVER ['argc ' ] : 0 ;
121
- $ components = array () ;
121
+ $ components = [] ;
122
122
$ cmd = array_map ('escapeshellarg ' , $ argv );
123
123
$ exit = 0 ;
124
124
@@ -153,7 +153,7 @@ if ('\\' === DIRECTORY_SEPARATOR) {
153
153
154
154
if ($ components ) {
155
155
$ skippedTests = isset ($ _SERVER ['SYMFONY_PHPUNIT_SKIPPED_TESTS ' ]) ? $ _SERVER ['SYMFONY_PHPUNIT_SKIPPED_TESTS ' ] : false ;
156
- $ runningProcs = array () ;
156
+ $ runningProcs = [] ;
157
157
158
158
foreach ($ components as $ component ) {
159
159
// Run phpunit tests in parallel
@@ -164,7 +164,7 @@ if ($components) {
164
164
165
165
$ c = escapeshellarg ($ component );
166
166
167
- if ($ proc = proc_open (sprintf ($ cmd , $ c , " > $ c/phpunit.stdout 2> $ c/phpunit.stderr " ), array () , $ pipes )) {
167
+ if ($ proc = proc_open (sprintf ($ cmd , $ c , " > $ c/phpunit.stdout 2> $ c/phpunit.stderr " ), [] , $ pipes )) {
168
168
$ runningProcs [$ component ] = $ proc ;
169
169
} else {
170
170
$ exit = 1 ;
@@ -174,7 +174,7 @@ if ($components) {
174
174
175
175
while ($ runningProcs ) {
176
176
usleep (300000 );
177
- $ terminatedProcs = array () ;
177
+ $ terminatedProcs = [] ;
178
178
foreach ($ runningProcs as $ component => $ proc ) {
179
179
$ procStatus = proc_get_status ($ proc );
180
180
if (!$ procStatus ['running ' ]) {
@@ -185,7 +185,7 @@ if ($components) {
185
185
}
186
186
187
187
foreach ($ terminatedProcs as $ component => $ procStatus ) {
188
- foreach (array ( 'out ' , 'err ' ) as $ file ) {
188
+ foreach ([ 'out ' , 'err ' ] as $ file ) {
189
189
$ file = "$ component/phpunit.std $ file " ;
190
190
readfile ($ file );
191
191
unlink ($ file );
@@ -195,7 +195,7 @@ if ($components) {
195
195
// STATUS_STACK_BUFFER_OVERRUN (-1073740791/0xC0000409)
196
196
// STATUS_ACCESS_VIOLATION (-1073741819/0xC0000005)
197
197
// STATUS_HEAP_CORRUPTION (-1073740940/0xC0000374)
198
- if ($ procStatus && ('\\' !== DIRECTORY_SEPARATOR || !extension_loaded ('apcu ' ) || !filter_var (ini_get ('apc.enable_cli ' ), FILTER_VALIDATE_BOOLEAN ) || !in_array ($ procStatus , array ( -1073740791 , -1073741819 , -1073740940 ) ))) {
198
+ if ($ procStatus && ('\\' !== DIRECTORY_SEPARATOR || !extension_loaded ('apcu ' ) || !filter_var (ini_get ('apc.enable_cli ' ), FILTER_VALIDATE_BOOLEAN ) || !in_array ($ procStatus , [ -1073740791 , -1073741819 , -1073740940 ] ))) {
199
199
$ exit = $ procStatus ;
200
200
echo "\033[41mKO \033[0m $ component \n\n" ;
201
201
} else {
@@ -207,7 +207,7 @@ if ($components) {
207
207
if (!class_exists ('SymfonyBlacklistSimplePhpunit ' , false )) {
208
208
class SymfonyBlacklistSimplePhpunit {}
209
209
}
210
- array_splice ($ argv , 1 , 0 , array ( '--colors=always ' ) );
210
+ array_splice ($ argv , 1 , 0 , [ '--colors=always ' ] );
211
211
$ _SERVER ['argv ' ] = $ argv ;
212
212
$ _SERVER ['argc ' ] = ++$ argc ;
213
213
include "$ PHPUNIT_DIR /phpunit- $ PHPUNIT_VERSION /phpunit " ;
0 commit comments