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=f3cbf4c7ec6f7c0dbd22290a3386c5837c125e28;hpb=eba34333e3c89f208d2f72fa91351ad019a71583;p=yaffs-website diff --git a/vendor/drupal/console-core/src/Generator/InitGenerator.php b/vendor/drupal/console-core/src/Generator/InitGenerator.php index f3cbf4c7e..be2dc6667 100644 --- a/vendor/drupal/console-core/src/Generator/InitGenerator.php +++ b/vendor/drupal/console-core/src/Generator/InitGenerator.php @@ -14,23 +14,19 @@ namespace 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; }, @@ -39,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) {