From 06c96ce2d646156d8acae935861d4e96e092b903 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 11 Jan 2017 00:37:22 +0100 Subject: [PATCH] compatibility with nette/php-generator v2.6 [Closes #150] --- src/DI/ContainerBuilder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/DI/ContainerBuilder.php b/src/DI/ContainerBuilder.php index 563264bf8..636be84d5 100644 --- a/src/DI/ContainerBuilder.php +++ b/src/DI/ContainerBuilder.php @@ -669,10 +669,9 @@ private function convertParameters(array $parameters) $res = array(); foreach ($parameters as $k => $v) { $tmp = explode(' ', is_int($k) ? $v : $k); - $param = $res[] = new Nette\PhpGenerator\Parameter; - $param->setName(end($tmp)); + $param = $res[] = new Nette\PhpGenerator\Parameter(end($tmp)); if (!is_int($k)) { - $param = $param->setOptional(TRUE)->setDefaultValue($v); + $param->setOptional(TRUE)->setDefaultValue($v); } if (isset($tmp[1])) { $param->setTypeHint($tmp[0]);