Skip to content

Commit b975b8b

Browse files
committed
unify constructor initialization style throughout symfony
1 parent 92cdb41 commit b975b8b

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

Helper/HelperSet.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class HelperSet implements \IteratorAggregate
2222
{
23-
private $helpers;
23+
private $helpers = array();
2424
private $command;
2525

2626
/**
@@ -30,7 +30,6 @@ class HelperSet implements \IteratorAggregate
3030
*/
3131
public function __construct(array $helpers = array())
3232
{
33-
$this->helpers = array();
3433
foreach ($helpers as $alias => $helper) {
3534
$this->set($helper, is_int($alias) ? null : $alias);
3635
}

Input/Input.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@
2424
*/
2525
abstract class Input implements InputInterface
2626
{
27+
/**
28+
* @var InputDefinition
29+
*/
2730
protected $definition;
28-
protected $options;
29-
protected $arguments;
31+
protected $options = array();
32+
protected $arguments = array();
3033
protected $interactive = true;
3134

3235
/**
@@ -37,8 +40,6 @@ abstract class Input implements InputInterface
3740
public function __construct(InputDefinition $definition = null)
3841
{
3942
if (null === $definition) {
40-
$this->arguments = array();
41-
$this->options = array();
4243
$this->definition = new InputDefinition();
4344
} else {
4445
$this->bind($definition);

Shell.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Shell
3232
private $history;
3333
private $output;
3434
private $hasReadline;
35-
private $processIsolation;
35+
private $processIsolation = false;
3636

3737
/**
3838
* Constructor.
@@ -48,7 +48,6 @@ public function __construct(Application $application)
4848
$this->application = $application;
4949
$this->history = getenv('HOME').'/.history_'.$application->getName();
5050
$this->output = new ConsoleOutput();
51-
$this->processIsolation = false;
5251
}
5352

5453
/**

0 commit comments

Comments
 (0)