composer update

This commit is contained in:
2019-07-02 01:51:56 +00:00
parent b4a728213d
commit ebb41422f3
616 changed files with 14708 additions and 612 deletions

View File

@@ -783,7 +783,7 @@ class Application
if (false !== strpos($message, "class@anonymous\0")) {
$message = preg_replace_callback('/class@anonymous\x00.*?\.php0x?[0-9a-fA-F]++/', function ($m) {
return \class_exists($m[0], false) ? get_parent_class($m[0]).'@anonymous' : $m[0];
return class_exists($m[0], false) ? get_parent_class($m[0]).'@anonymous' : $m[0];
}, $message);
}

View File

@@ -51,7 +51,7 @@ class ProcessHelper extends Helper
if (!\is_array($cmd)) {
@trigger_error(sprintf('Passing a command as a string to "%s()" is deprecated since Symfony 4.2, pass it the command as an array of arguments instead.', __METHOD__), E_USER_DEPRECATED);
$cmd = [\method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd)];
$cmd = [method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd)];
}
if (\is_string($cmd[0] ?? null)) {

View File

@@ -250,7 +250,7 @@ final class ProgressBar
*/
public function iterate(iterable $iterable, ?int $max = null): iterable
{
$this->start($max ?? (\is_countable($iterable) ? \count($iterable) : 0));
$this->start($max ?? (is_countable($iterable) ? \count($iterable) : 0));
foreach ($iterable as $key => $value) {
yield $key => $value;

View File

@@ -50,7 +50,7 @@ class ConsoleSectionOutput extends StreamOutput
}
if ($lines) {
\array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content
array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content
} else {
$lines = $this->lines;
$this->content = [];

View File

@@ -26,7 +26,7 @@ class ProcessHelperTest extends TestCase
public function testVariousProcessRuns($expected, $cmd, $verbosity, $error)
{
if (\is_string($cmd)) {
$cmd = \method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd);
$cmd = method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd);
}
$helper = new ProcessHelper();
@@ -99,7 +99,7 @@ EOT;
$args = new Process(['php', '-r', 'echo 42;']);
$args = $args->getCommandLine();
$successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug);
$fromShellCommandline = \method_exists(Process::class, 'fromShellCommandline') ? [Process::class, 'fromShellCommandline'] : function ($cmd) { return new Process($cmd); };
$fromShellCommandline = method_exists(Process::class, 'fromShellCommandline') ? [Process::class, 'fromShellCommandline'] : function ($cmd) { return new Process($cmd); };
return [
['', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null],

View File

@@ -884,7 +884,7 @@ class ProgressBarTest extends TestCase
{
$bar = new ProgressBar($output = $this->getOutputStream());
$this->assertEquals([1, 2], \iterator_to_array($bar->iterate([1, 2])));
$this->assertEquals([1, 2], iterator_to_array($bar->iterate([1, 2])));
rewind($output->getStream());
$this->assertEquals(
@@ -900,7 +900,7 @@ class ProgressBarTest extends TestCase
{
$bar = new ProgressBar($output = $this->getOutputStream());
$this->assertEquals([1, 2], \iterator_to_array($bar->iterate((function () {
$this->assertEquals([1, 2], iterator_to_array($bar->iterate((function () {
yield 1;
yield 2;
})())));