Skip to content

Commit 5a7f819

Browse files
committed
fixed CS
1 parent 58b6521 commit 5a7f819

File tree

4 files changed

+105
-105
lines changed

4 files changed

+105
-105
lines changed

Process.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function __construct($command, string $cwd = null, array $env = null, $in
190190
*/
191191
public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
192192
{
193-
$process = new static(array(), $cwd, $env, $input, $timeout);
193+
$process = new static([], $cwd, $env, $input, $timeout);
194194
$process->commandline = $command;
195195

196196
return $process;

Tests/KillableProcessWithOutput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
$outputs = array(
12+
$outputs = [
1313
'First iteration output',
1414
'Second iteration output',
1515
'One more iteration output',
1616
'This took more time',
17-
);
17+
];
1818

1919
$iterationTime = 10000;
2020

Tests/ProcessFailedExceptionTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ProcessFailedExceptionTest extends TestCase
2424
*/
2525
public function testProcessFailedExceptionThrowsException()
2626
{
27-
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful'))->setConstructorArgs(array(array('php')))->getMock();
27+
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful'])->setConstructorArgs([['php']])->getMock();
2828
$process->expects($this->once())
2929
->method('isSuccessful')
3030
->will($this->returnValue(true));
@@ -52,7 +52,7 @@ public function testProcessFailedExceptionPopulatesInformationFromProcessOutput(
5252
$errorOutput = 'FATAL: Unexpected error';
5353
$workingDirectory = getcwd();
5454

55-
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'))->setConstructorArgs(array(array($cmd)))->getMock();
55+
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'])->setConstructorArgs([[$cmd]])->getMock();
5656
$process->expects($this->once())
5757
->method('isSuccessful')
5858
->will($this->returnValue(false));
@@ -100,7 +100,7 @@ public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput()
100100
$exitText = 'General error';
101101
$workingDirectory = getcwd();
102102

103-
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'))->setConstructorArgs(array(array($cmd)))->getMock();
103+
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'])->setConstructorArgs([[$cmd]])->getMock();
104104
$process->expects($this->once())
105105
->method('isSuccessful')
106106
->will($this->returnValue(false));

0 commit comments

Comments
 (0)