@@ -261,6 +261,9 @@ discard block |
||
261 | 261 | createYaml(getPathConfig(), $config_path.'/path.yml'); |
262 | 262 | } |
263 | 263 | |
264 | +/** |
|
265 | + * @param string $path |
|
266 | + */ |
|
264 | 267 | function createYaml($config, $path) |
265 | 268 | { |
266 | 269 | $content = \Symfony\Component\Yaml\Yaml::dump($config); |
@@ -412,6 +415,7 @@ discard block |
||
412 | 415 | |
413 | 416 | /** |
414 | 417 | * @link https://github.com/composer/windows-setup/blob/master/src/php/installer.php |
418 | + * @param string $color |
|
415 | 419 | */ |
416 | 420 | function out($text, $color = null, $newLine = true) |
417 | 421 | { |
@@ -306,11 +306,11 @@ |
||
306 | 306 | $database['database']['dbname'] = (getenv('DBNAME') ? getenv('DBNAME') : 'cube3_dev'); |
307 | 307 | $database['database']['user'] = (getenv('DBUSER') ? getenv('DBUSER') : 'cube3_dev_user'); |
308 | 308 | $database['database']['port'] = (getenv('DBPORT') ? getenv('DBPORT') : '3306'); |
309 | - if (getenv('TRAVIS')) { |
|
310 | - $database['database']['password'] = ''; |
|
311 | - } else { |
|
312 | - $database['database']['password'] = (getenv('DBPASS') ? getenv('DBPASS') : 'password'); |
|
313 | - } |
|
309 | + if (getenv('TRAVIS')) { |
|
310 | + $database['database']['password'] = ''; |
|
311 | + } else { |
|
312 | + $database['database']['password'] = (getenv('DBPASS') ? getenv('DBPASS') : 'password'); |
|
313 | + } |
|
314 | 314 | break; |
315 | 315 | case 'pdo_pgsql': |
316 | 316 | $database['database']['host'] = (getenv('DBSERVER') ? getenv('DBSERVER') : 'localhost'); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | out('EC-CUBE3 installer use database driver of ', null, false); |
26 | 26 | |
27 | 27 | $database_driver = 'pdo_sqlite'; |
28 | -switch($argv[1]) { |
|
28 | +switch ($argv[1]) { |
|
29 | 29 | case 'mysql': |
30 | 30 | $database_driver = 'pdo_mysql'; |
31 | 31 | break; |
@@ -270,13 +270,13 @@ discard block |
||
270 | 270 | |
271 | 271 | function getConfig() |
272 | 272 | { |
273 | - $config = array ( |
|
273 | + $config = array( |
|
274 | 274 | 'auth_magic' => \Eccube\Util\Str::random(32), |
275 | 275 | 'password_hash_algos' => 'sha256', |
276 | 276 | 'shop_name' => (getenv('SHOP_NAME') ? getenv('SHOP_NAME') : 'admin'), |
277 | 277 | 'force_ssl' => NULL, |
278 | 278 | 'admin_allow_host' => |
279 | - array ( |
|
279 | + array( |
|
280 | 280 | ), |
281 | 281 | 'cookie_lifetime' => 0, |
282 | 282 | 'locale' => 'ja', |
@@ -288,9 +288,9 @@ discard block |
||
288 | 288 | |
289 | 289 | function getDatabaseConfig($database_driver) |
290 | 290 | { |
291 | - $database = array ( |
|
291 | + $database = array( |
|
292 | 292 | 'database' => |
293 | - array ( |
|
293 | + array( |
|
294 | 294 | 'driver' => $database_driver, |
295 | 295 | ) |
296 | 296 | ); |
@@ -328,9 +328,9 @@ discard block |
||
328 | 328 | |
329 | 329 | function getMailConfig() |
330 | 330 | { |
331 | - $mail = array ( |
|
331 | + $mail = array( |
|
332 | 332 | 'mail' => |
333 | - array ( |
|
333 | + array( |
|
334 | 334 | 'transport' => (getenv('MAIL_BACKEND') ? getenv('MAIL_BACKEND') : 'smtp'), |
335 | 335 | 'host' => (getenv('MAIL_HOST') ? getenv('MAIL_HOST') : 'localhost'), |
336 | 336 | 'port' => (getenv('MAIL_PORT') ? getenv('MAIL_PORT') : 25), |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $root_dir = realpath(__DIR__); |
350 | 350 | // TODO path.yml.dist から取得したい |
351 | 351 | // TODO root_urlpath を指定できるようにする |
352 | - $path = array ( |
|
352 | + $path = array( |
|
353 | 353 | 'root' => '/', |
354 | 354 | 'admin_dir' => (getenv('ADMIN_ROUTE') ? getenv('ADMIN_ROUTE') : 'admin'), |
355 | 355 | 'tpl' => '/user_data/packages/default/', |