From 4dc90946e9a652b9bb7fc381c53afc548e7ac5d5 Mon Sep 17 00:00:00 2001 From: SilverFire - Dmitry Naumenko Date: Mon, 7 Aug 2017 23:46:37 +0300 Subject: [PATCH] Call `require` as statment. Closes #123 --- config/console.php | 4 ++-- config/test.php | 4 ++-- config/test_db.php | 4 ++-- config/web.php | 4 ++-- tests/bin/yii | 10 +++++----- yii | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/config/console.php b/config/console.php index 3945d9e..6660dd4 100644 --- a/config/console.php +++ b/config/console.php @@ -1,7 +1,7 @@ 'basic-console', diff --git a/config/test.php b/config/test.php index e025a9c..ff9fc6c 100644 --- a/config/test.php +++ b/config/test.php @@ -1,6 +1,6 @@ 'basic', diff --git a/tests/bin/yii b/tests/bin/yii index 1e4f2cc..4923537 100755 --- a/tests/bin/yii +++ b/tests/bin/yii @@ -11,14 +11,14 @@ defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'test'); -require(__DIR__ . '/../../vendor/autoload.php'); -require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); +require __DIR__ . '/../../vendor/autoload.php'; +require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'; $config = yii\helpers\ArrayHelper::merge( - require(__DIR__ . '/../../config/console.php'), + require __DIR__ . '/../../config/console.php', [ 'components' => [ - 'db' => require(__DIR__ . '/../../config/test_db.php') + 'db' => require __DIR__ . '/../../config/test_db.php' ] ] ); @@ -26,4 +26,4 @@ $config = yii\helpers\ArrayHelper::merge( $application = new yii\console\Application($config); $exitCode = $application->run(); -exit($exitCode); \ No newline at end of file +exit($exitCode); diff --git a/yii b/yii index fc7090f..2a2e8ed 100755 --- a/yii +++ b/yii @@ -11,10 +11,10 @@ defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'dev'); -require(__DIR__ . '/vendor/autoload.php'); -require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); +require __DIR__ . '/vendor/autoload.php'; +require __DIR__ . '/vendor/yiisoft/yii2/Yii.php'; -$config = require(__DIR__ . '/config/console.php'); +$config = require __DIR__ . '/config/console.php'; $application = new yii\console\Application($config); $exitCode = $application->run();