Skip to content

Commit 2e429fe

Browse files
committed
Make php 7.0 happy with Execute constructor.
This can be reverted when #21 is addressed.
1 parent 73bb1a3 commit 2e429fe

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/Process/Execute.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,36 @@ class Execute
4444
*/
4545
public $parallelWaitTime = 200000;
4646

47-
public function __construct(?OutputInterface $output = null, ?ProcessHelper $helper = null)
47+
/**
48+
* TODO: Add nullable type declaration for params when we switch to php 7.1.
49+
*
50+
* @param OutputInterface|null $output
51+
* @param ProcessHelper|null $helper
52+
*/
53+
public function __construct($output = null, $helper = null)
4854
{
4955
$this->setOutput($output);
5056
$this->setHelper($helper);
5157
}
5258

5359
/**
5460
* Output setter.
61+
* TODO: Add nullable type declaration for param when we switch to php 7.1.
5562
*
5663
* @param OutputInterface|null $output
5764
*/
58-
public function setOutput(?OutputInterface $output)
65+
public function setOutput($output)
5966
{
6067
$this->output = $output ?? new NullOutput();
6168
}
6269

6370
/**
6471
* Process helper setter.
72+
* TODO: Add nullable type declaration for param when we switch to php 7.1.
6573
*
66-
* @param OutputInterface|null $output
74+
* @param ProcessHelper|null $helper
6775
*/
68-
public function setHelper(?ProcessHelper $helper)
76+
public function setHelper($helper)
6977
{
7078
if (empty($helper)) {
7179
$helper = new ProcessHelper();

0 commit comments

Comments
 (0)