@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | 'class' => EditableColumn::class, |
37 | 37 | 'attribute' => 'status', |
38 | 38 | 'url' => ['edit-user'], |
39 | - 'value' => function ($model) { |
|
39 | + 'value' => function($model) { |
|
40 | 40 | return UserStatus::getLabel($model->status); |
41 | 41 | }, |
42 | 42 | 'type' => 'select', |
43 | - 'editableOptions' => function ($model) { |
|
43 | + 'editableOptions' => function($model) { |
|
44 | 44 | return [ |
45 | 45 | 'source' => UserStatus::listData(), |
46 | 46 | 'value' => $model->status, |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'class' => 'yii\grid\ActionColumn', |
60 | 60 | 'template' => '{switch} {update} {delete}', |
61 | 61 | 'buttons' => [ |
62 | - 'switch' => function ($url, $model) { |
|
62 | + 'switch' => function($url, $model) { |
|
63 | 63 | $options = [ |
64 | 64 | 'title' => Yii::t('app', 'Become this user'), |
65 | 65 | 'aria-label' => Yii::t('app', 'Become this user'), |
@@ -76,7 +76,7 @@ |
||
76 | 76 | 'options' => ['class' => 'navbar-nav navbar-right'], |
77 | 77 | 'items' => [ |
78 | 78 | ['label' => '<i class="glyphicon glyphicon-globe"></i> Public Area', 'url' => ['/']], |
79 | - ['label' => '<i class="glyphicon glyphicon-off"></i> Logout (' . Yii::$app->user->identity->username . ')', |
|
79 | + ['label' => '<i class="glyphicon glyphicon-off"></i> Logout ('.Yii::$app->user->identity->username.')', |
|
80 | 80 | 'url' => ['/site/logout'], |
81 | 81 | 'linkOptions' => ['data-method' => 'post'], |
82 | 82 | ], |
@@ -3,14 +3,14 @@ |
||
3 | 3 | defined('YII_DEBUG') or define('YII_DEBUG', false); |
4 | 4 | defined('YII_ENV') or define('YII_ENV', 'prod'); |
5 | 5 | |
6 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
7 | -require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
6 | +require(__DIR__.'/../vendor/autoload.php'); |
|
7 | +require(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
8 | 8 | |
9 | 9 | $config = yii\helpers\ArrayHelper::merge( |
10 | - require(__DIR__ . '/../config/common.php'), |
|
11 | - require(__DIR__ . '/../config/common-local.php'), |
|
12 | - require(__DIR__ . '/../config/main.php'), |
|
13 | - require(__DIR__ . '/../config/main-local.php') |
|
10 | + require(__DIR__.'/../config/common.php'), |
|
11 | + require(__DIR__.'/../config/common-local.php'), |
|
12 | + require(__DIR__.'/../config/main.php'), |
|
13 | + require(__DIR__.'/../config/main-local.php') |
|
14 | 14 | ); |
15 | 15 | |
16 | 16 | (new yii\web\Application($config))->run(); |
@@ -8,9 +8,9 @@ |
||
8 | 8 | defined('YII_DEBUG') or define('YII_DEBUG', true); |
9 | 9 | defined('YII_ENV') or define('YII_ENV', 'test'); |
10 | 10 | |
11 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
12 | -require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
11 | +require(__DIR__.'/../vendor/autoload.php'); |
|
12 | +require(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
13 | 13 | |
14 | -$config = require(__DIR__ . '/../config/test.php'); |
|
14 | +$config = require(__DIR__.'/../config/test.php'); |
|
15 | 15 | |
16 | 16 | (new yii\web\Application($config))->run(); |
@@ -3,14 +3,14 @@ |
||
3 | 3 | defined('YII_DEBUG') or define('YII_DEBUG', true); |
4 | 4 | defined('YII_ENV') or define('YII_ENV', 'dev'); |
5 | 5 | |
6 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
7 | -require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
6 | +require(__DIR__.'/../vendor/autoload.php'); |
|
7 | +require(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
8 | 8 | |
9 | 9 | $config = yii\helpers\ArrayHelper::merge( |
10 | - require(__DIR__ . '/../config/common.php'), |
|
11 | - require(__DIR__ . '/../config/common-local.php'), |
|
12 | - require(__DIR__ . '/../config/main.php'), |
|
13 | - require(__DIR__ . '/../config/main-local.php') |
|
10 | + require(__DIR__.'/../config/common.php'), |
|
11 | + require(__DIR__.'/../config/common-local.php'), |
|
12 | + require(__DIR__.'/../config/main.php'), |
|
13 | + require(__DIR__.'/../config/main-local.php') |
|
14 | 14 | ); |
15 | 15 | |
16 | 16 | (new yii\web\Application($config))->run(); |
@@ -3,19 +3,19 @@ |
||
3 | 3 | * Application configuration shared by all test types |
4 | 4 | */ |
5 | 5 | return yii\helpers\ArrayHelper::merge( |
6 | - require __DIR__ . '/main.php', |
|
7 | - require __DIR__ . '/main-local.php', |
|
8 | - require __DIR__ . '/common.php', |
|
9 | - require __DIR__ . '/common-local.php', |
|
6 | + require __DIR__.'/main.php', |
|
7 | + require __DIR__.'/main-local.php', |
|
8 | + require __DIR__.'/common.php', |
|
9 | + require __DIR__.'/common-local.php', |
|
10 | 10 | [ |
11 | 11 | 'id' => 'basic-tests', |
12 | 12 | 'components' => [ |
13 | - 'db' => require __DIR__ . '/test_db.php', |
|
13 | + 'db' => require __DIR__.'/test_db.php', |
|
14 | 14 | 'mailer' => [ |
15 | 15 | 'useFileTransport' => true, |
16 | 16 | ], |
17 | 17 | 'assetManager' => [ |
18 | - 'basePath' => __DIR__ . '/../web/assets', |
|
18 | + 'basePath' => __DIR__.'/../web/assets', |
|
19 | 19 | ], |
20 | 20 | 'urlManager' => [ |
21 | 21 | 'showScriptName' => true, |
@@ -11,16 +11,16 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // you may need to adjust this path to the correct Yii framework path |
14 | -$frameworkPath = dirname(__FILE__) . '/vendor/yiisoft/yii2'; |
|
14 | +$frameworkPath = dirname(__FILE__).'/vendor/yiisoft/yii2'; |
|
15 | 15 | |
16 | 16 | if (!is_dir($frameworkPath)) { |
17 | 17 | echo '<h1>Error</h1>'; |
18 | 18 | echo '<p><strong>The path to yii framework seems to be incorrect.</strong></p>'; |
19 | - echo '<p>You need to install Yii framework via composer or adjust the framework path in file <abbr title="' . __FILE__ . '">' . basename(__FILE__) . '</abbr>.</p>'; |
|
20 | - echo '<p>Please refer to the <abbr title="' . dirname(__FILE__) . '/README.md">README</abbr> on how to install Yii.</p>'; |
|
19 | + echo '<p>You need to install Yii framework via composer or adjust the framework path in file <abbr title="'.__FILE__.'">'.basename(__FILE__).'</abbr>.</p>'; |
|
20 | + echo '<p>Please refer to the <abbr title="'.dirname(__FILE__).'/README.md">README</abbr> on how to install Yii.</p>'; |
|
21 | 21 | } |
22 | 22 | |
23 | -require_once($frameworkPath . '/requirements/YiiRequirementChecker.php'); |
|
23 | +require_once($frameworkPath.'/requirements/YiiRequirementChecker.php'); |
|
24 | 24 | $requirementsChecker = new YiiRequirementChecker(); |
25 | 25 | |
26 | 26 | $gdMemo = $imagickMemo = 'Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.'; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | 'user' => [ |
54 | 54 | 'identityClass' => 'app\models\UserModel', |
55 | 55 | 'enableAutoLogin' => true, |
56 | - 'on afterLogin' => function ($event) { |
|
56 | + 'on afterLogin' => function($event) { |
|
57 | 57 | $event->identity->updateLastLogin(); |
58 | 58 | }, |
59 | 59 | ], |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -Yii::setAlias('@tests', dirname(__DIR__) . '/tests'); |
|
3 | +Yii::setAlias('@tests', dirname(__DIR__).'/tests'); |
|
4 | 4 | |
5 | 5 | $params = array_merge( |
6 | - require(__DIR__ . '/params.php'), |
|
7 | - require(__DIR__ . '/params-local.php') |
|
6 | + require(__DIR__.'/params.php'), |
|
7 | + require(__DIR__.'/params-local.php') |
|
8 | 8 | ); |
9 | 9 | |
10 | 10 | $config = [ |