Skip to content

Commit d61ec43

Browse files
committed
fixed short array CS in comments
1 parent c99a6b4 commit d61ec43

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Tests/DeprecationErrorHandler/default.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Test
2525
{
2626
public static function getGroups()
2727
{
28-
return array();
28+
return [];
2929
}
3030
}
3131
EOPHP

Tests/DeprecationErrorHandler/fake_vendor/acme/lib/deprecation_riddled.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Test
77
{
88
public static function getGroups()
99
{
10-
return array();
10+
return [];
1111
}
1212
}
1313
EOPHP

Tests/DeprecationErrorHandler/shutdown_deprecations.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Test
2525
{
2626
public static function getGroups()
2727
{
28-
return array();
28+
return [];
2929
}
3030
}
3131
EOPHP

Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Test
2525
{
2626
public static function getGroups()
2727
{
28-
return array();
28+
return [];
2929
}
3030
}
3131
EOPHP

bin/simple-phpunit

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
8383
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
8484
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");
8585
// --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]));
8787
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
8888
if ($exit) {
8989
exit($exit);
@@ -116,9 +116,9 @@ EOPHP
116116
}
117117

118118
global $argv, $argc;
119-
$argv = isset($_SERVER['argv']) ? $_SERVER['argv'] : array();
119+
$argv = isset($_SERVER['argv']) ? $_SERVER['argv'] : [];
120120
$argc = isset($_SERVER['argc']) ? $_SERVER['argc'] : 0;
121-
$components = array();
121+
$components = [];
122122
$cmd = array_map('escapeshellarg', $argv);
123123
$exit = 0;
124124

@@ -153,7 +153,7 @@ if ('\\' === DIRECTORY_SEPARATOR) {
153153

154154
if ($components) {
155155
$skippedTests = isset($_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS']) ? $_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS'] : false;
156-
$runningProcs = array();
156+
$runningProcs = [];
157157

158158
foreach ($components as $component) {
159159
// Run phpunit tests in parallel
@@ -164,7 +164,7 @@ if ($components) {
164164

165165
$c = escapeshellarg($component);
166166

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)) {
168168
$runningProcs[$component] = $proc;
169169
} else {
170170
$exit = 1;
@@ -174,7 +174,7 @@ if ($components) {
174174

175175
while ($runningProcs) {
176176
usleep(300000);
177-
$terminatedProcs = array();
177+
$terminatedProcs = [];
178178
foreach ($runningProcs as $component => $proc) {
179179
$procStatus = proc_get_status($proc);
180180
if (!$procStatus['running']) {
@@ -185,7 +185,7 @@ if ($components) {
185185
}
186186

187187
foreach ($terminatedProcs as $component => $procStatus) {
188-
foreach (array('out', 'err') as $file) {
188+
foreach (['out', 'err'] as $file) {
189189
$file = "$component/phpunit.std$file";
190190
readfile($file);
191191
unlink($file);
@@ -195,7 +195,7 @@ if ($components) {
195195
// STATUS_STACK_BUFFER_OVERRUN (-1073740791/0xC0000409)
196196
// STATUS_ACCESS_VIOLATION (-1073741819/0xC0000005)
197197
// 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]))) {
199199
$exit = $procStatus;
200200
echo "\033[41mKO\033[0m $component\n\n";
201201
} else {
@@ -207,7 +207,7 @@ if ($components) {
207207
if (!class_exists('SymfonyBlacklistSimplePhpunit', false)) {
208208
class SymfonyBlacklistSimplePhpunit {}
209209
}
210-
array_splice($argv, 1, 0, array('--colors=always'));
210+
array_splice($argv, 1, 0, ['--colors=always']);
211211
$_SERVER['argv'] = $argv;
212212
$_SERVER['argc'] = ++$argc;
213213
include "$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit";

0 commit comments

Comments
 (0)