X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole-core%2Fsrc%2FGenerator%2FInitGenerator.php;h=be2dc666798ae1bf32e8a459b08cea13e7dc9d7b;hb=4e1bfbf98b844da83b18aca92ef00f11a4735806;hp=ff8d3fc381855e087027542d458e85dc24d7ab93;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/drupal/console-core/src/Generator/InitGenerator.php b/vendor/drupal/console-core/src/Generator/InitGenerator.php index ff8d3fc38..be2dc6667 100644 --- a/vendor/drupal/console-core/src/Generator/InitGenerator.php +++ b/vendor/drupal/console-core/src/Generator/InitGenerator.php @@ -8,28 +8,25 @@ namespace Drupal\Console\Core\Generator; /** * Class InitGenerator + * * @package Drupal\Console\Core\Generator */ class InitGenerator extends Generator { /** - * @param string $userHome - * @param string $executableName - * @param boolean $override - * @param string $destination - * @param array $configParameters + * {@inheritdoc} */ - public function generate( - $userHome, - $executableName, - $override, - $destination, - $configParameters - ) { + public function generate(array $parameters) { + $userHome = $parameters['user_home']; + $executableName = $parameters['executable_name']; + $override = $parameters['override']; + $destination = $parameters['destination']; + $configParameters = $parameters['config_parameters']; + $configParameters = array_map( function ($item) { if (is_bool($item)) { - return $item?"true":"false"; + return $item ? 'true' : 'false'; } return $item; }, @@ -38,7 +35,7 @@ class InitGenerator extends Generator $configFile = $userHome . 'config.yml'; if ($destination) { - $configFile = $destination.'config.yml'; + $configFile = $destination . 'config.yml'; } if (file_exists($configFile) && $override) {