Using require as a statement (#140)

This commit is contained in:
Bulat Damdinov 2017-09-12 17:16:50 +08:00 committed by Carsten Brandt
parent 2f2e2506c6
commit d965cf55ac
3 changed files with 7 additions and 7 deletions

View File

@ -2,5 +2,5 @@
define('YII_ENV', 'test'); define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true); 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'; require __DIR__ .'/../vendor/autoload.php';

View File

@ -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_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test'); defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../vendor/autoload.php'); require __DIR__ . '/../vendor/autoload.php';
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.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(); (new yii\web\Application($config))->run();

View File

@ -4,9 +4,9 @@
defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev'); defined('YII_ENV') or define('YII_ENV', 'dev');
require(__DIR__ . '/../vendor/autoload.php'); require __DIR__ . '/../vendor/autoload.php';
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.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(); (new yii\web\Application($config))->run();