Navigation Menu

Skip to content

Commit

Permalink
[DependencyInjection] PhpDumper, fixes #2730
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalkaoz committed Jan 6, 2012
1 parent 3e9d937 commit 9441c46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -648,14 +648,16 @@ class $class extends $baseClass
*/
private function addConstructor()
{
$arguments = $this->container->getParameterBag()->all() ? 'new ParameterBag($this->getDefaultParameters())' : null;

$code = <<<EOF
/**
* Constructor.
*/
public function __construct()
{
parent::__construct(new ParameterBag(\$this->getDefaultParameters()));
parent::__construct($arguments);
EOF;

Expand Down
Expand Up @@ -20,6 +20,6 @@ class Container extends AbstractContainer
*/
public function __construct()
{
parent::__construct(new ParameterBag($this->getDefaultParameters()));
parent::__construct();
}
}
Expand Up @@ -20,6 +20,6 @@ class ProjectServiceContainer extends Container
*/
public function __construct()
{
parent::__construct(new ParameterBag($this->getDefaultParameters()));
parent::__construct();
}
}

0 comments on commit 9441c46

Please sign in to comment.