Skip to content

Commit 4dc9094

Browse files
committed
Call require as statment. Closes yiisoft#123
1 parent 02cf920 commit 4dc9094

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

config/console.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
$params = require(__DIR__ . '/params.php');
4-
$db = require(__DIR__ . '/db.php');
3+
$params = require __DIR__ . '/params.php';
4+
$db = require __DIR__ . '/db.php';
55

66
$config = [
77
'id' => 'basic-console',

config/test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
$params = require(__DIR__ . '/params.php');
3-
$db = require(__DIR__ . '/test_db.php');
2+
$params = require __DIR__ . '/params.php';
3+
$db = require __DIR__ . '/test_db.php';
44

55
/**
66
* Application configuration shared by all test types

config/test_db.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
$db = require(__DIR__ . '/db.php');
2+
$db = require __DIR__ . '/db.php';
33
// test database! Important not to run tests on production or development databases
44
$db['dsn'] = 'mysql:host=localhost;dbname=yii2_basic_tests';
55

6-
return $db;
6+
return $db;

config/web.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
$params = require(__DIR__ . '/params.php');
4-
$db = require(__DIR__ . '/db.php');
3+
$params = require __DIR__ . '/params.php';
4+
$db = require __DIR__ . '/db.php';
55

66
$config = [
77
'id' => 'basic',

tests/bin/yii

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
defined('YII_DEBUG') or define('YII_DEBUG', true);
1212
defined('YII_ENV') or define('YII_ENV', 'test');
1313

14-
require(__DIR__ . '/../../vendor/autoload.php');
15-
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
14+
require __DIR__ . '/../../vendor/autoload.php';
15+
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
1616

1717
$config = yii\helpers\ArrayHelper::merge(
18-
require(__DIR__ . '/../../config/console.php'),
18+
require __DIR__ . '/../../config/console.php',
1919
[
2020
'components' => [
21-
'db' => require(__DIR__ . '/../../config/test_db.php')
21+
'db' => require __DIR__ . '/../../config/test_db.php'
2222
]
2323
]
2424
);
2525

2626

2727
$application = new yii\console\Application($config);
2828
$exitCode = $application->run();
29-
exit($exitCode);
29+
exit($exitCode);

yii

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
defined('YII_DEBUG') or define('YII_DEBUG', true);
1212
defined('YII_ENV') or define('YII_ENV', 'dev');
1313

14-
require(__DIR__ . '/vendor/autoload.php');
15-
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
14+
require __DIR__ . '/vendor/autoload.php';
15+
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
1616

17-
$config = require(__DIR__ . '/config/console.php');
17+
$config = require __DIR__ . '/config/console.php';
1818

1919
$application = new yii\console\Application($config);
2020
$exitCode = $application->run();

0 commit comments

Comments
 (0)