From d965cf55ac85eb4372412b1ae65bec723bb3f7ce Mon Sep 17 00:00:00 2001 From: Bulat Damdinov Date: Tue, 12 Sep 2017 17:16:50 +0800 Subject: [PATCH] Using require as a statement (#140) --- tests/_bootstrap.php | 2 +- web/index-test.php | 6 +++--- web/index.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php index 969c089..131da42 100644 --- a/tests/_bootstrap.php +++ b/tests/_bootstrap.php @@ -2,5 +2,5 @@ define('YII_ENV', 'test'); defined('YII_DEBUG') or define('YII_DEBUG', true); -require_once(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); +require_once __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; require __DIR__ .'/../vendor/autoload.php'; \ No newline at end of file diff --git a/web/index-test.php b/web/index-test.php index 7ecf9d5..1ec192f 100644 --- a/web/index-test.php +++ b/web/index-test.php @@ -8,9 +8,9 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) { 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 = require(__DIR__ . '/../config/test.php'); +$config = require __DIR__ . '/../config/test.php'; (new yii\web\Application($config))->run(); diff --git a/web/index.php b/web/index.php index d1e070a..02d5e1d 100644 --- a/web/index.php +++ b/web/index.php @@ -4,9 +4,9 @@ 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/web.php'); +$config = require __DIR__ . '/../config/web.php'; (new yii\web\Application($config))->run();