@@ -3,7 +3,7 @@ |
||
3 | 3 | return [ |
4 | 4 | 'definitions' => [ |
5 | 5 | \yii\behaviors\TimestampBehavior::class => [ |
6 | - 'value' => function () { |
|
6 | + 'value' => function() { |
|
7 | 7 | return (new DateTime('now', new DateTimeZone('UTC')))->format('Y-m-d H:i:s'); |
8 | 8 | }, |
9 | 9 | ], |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$webConfig = require __DIR__.'/web.php'; |
|
3 | +$webConfig = require __DIR__ . '/web.php'; |
|
4 | 4 | |
5 | 5 | $db = require __DIR__ . '/test_db.php'; |
6 | 6 |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $color = array_shift($this->colors); |
71 | 71 | $data = ArrayHelper::getColumn($stats, $attribute); |
72 | 72 | if ($attribute == 'er') { |
73 | - $data = array_map(function ($item) { |
|
73 | + $data = array_map(function($item) { |
|
74 | 74 | return number_format($item * 100, 2); |
75 | 75 | }, $data); |
76 | 76 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | */ |
46 | 46 | public function search($params) |
47 | 47 | { |
48 | - $userId = (int)\Yii::$app->user->id; |
|
48 | + $userId = (int) \Yii::$app->user->id; |
|
49 | 49 | |
50 | 50 | $query = Account::find() |
51 | 51 | ->select([ |
@@ -32,7 +32,7 @@ |
||
32 | 32 | ['class' => \yii\grid\SerialColumn::class], |
33 | 33 | [ |
34 | 34 | 'attribute' => 'username', |
35 | - 'content' => function (\app\models\Account $model) { |
|
35 | + 'content' => function(\app\models\Account $model) { |
|
36 | 36 | $html = []; |
37 | 37 | $html[] = Html::a($model->displayName, ['account/dashboard', 'id' => $model->id]); |
38 | 38 | $html[] = Html::a('<span class="fa fa-external-link text-sm"></span>', Url::account($model->username), ['target' => '_blank']); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | [ |
47 | 47 | 'attribute' => 'name', |
48 | - 'content' => function (\app\models\Tag $model) { |
|
48 | + 'content' => function(\app\models\Tag $model) { |
|
49 | 49 | $html = []; |
50 | 50 | $html[] = Html::a($model->namePrefixed, ['tag/stats', 'id' => $model->id]); |
51 | 51 | $html[] = Html::a('<span class="fa fa-external-link text-sm"></span>', Url::tag($model->name), ['target' => '_blank']); |
@@ -19,9 +19,9 @@ |
||
19 | 19 | <?php foreach ($authAuthChoice->getClients() as $client): ?> |
20 | 20 | <div class="form-group text-center"> |
21 | 21 | <?php if ($client->getId() == 'google'): ?> |
22 | - <?= Html::a(Html::img('/img/btn_google_signin.png'), ['/admin/auth/auth', 'authclient' => $client->getName(),]) ?> |
|
22 | + <?= Html::a(Html::img('/img/btn_google_signin.png'), ['/admin/auth/auth', 'authclient' => $client->getName(), ]) ?> |
|
23 | 23 | <?php else: ?> |
24 | - <?= Html::a("<span class='fa fa-$client->name'></span> Sign in with " . $client->getTitle(), ['/admin/auth/auth', 'authclient' => $client->getName(),], ['class' => "btn btn-block btn-social btn-$client->name "]) ?> |
|
24 | + <?= Html::a("<span class='fa fa-$client->name'></span> Sign in with " . $client->getTitle(), ['/admin/auth/auth', 'authclient' => $client->getName(), ], ['class' => "btn btn-block btn-social btn-$client->name "]) ?> |
|
25 | 25 | <?php endif; ?> |
26 | 26 | </div> |
27 | 27 | <?php endforeach; ?> |
@@ -20,9 +20,12 @@ |
||
20 | 20 | <div class="form-group text-center"> |
21 | 21 | <?php if ($client->getId() == 'google'): ?> |
22 | 22 | <?= Html::a(Html::img('/img/btn_google_signin.png'), ['/admin/auth/auth', 'authclient' => $client->getName(),]) ?> |
23 | - <?php else: ?> |
|
23 | + <?php else { |
|
24 | + : ?> |
|
24 | 25 | <?= Html::a("<span class='fa fa-$client->name'></span> Sign in with " . $client->getTitle(), ['/admin/auth/auth', 'authclient' => $client->getName(),], ['class' => "btn btn-block btn-social btn-$client->name "]) ?> |
25 | - <?php endif; ?> |
|
26 | + <?php endif; |
|
27 | +} |
|
28 | +?> |
|
26 | 29 | </div> |
27 | 30 | <?php endforeach; ?> |
28 | 31 | <?php AuthChoice::end() ?> |
29 | 32 | \ No newline at end of file |
@@ -70,11 +70,11 @@ |
||
70 | 70 | 'class' => 'yii\gii\Module', |
71 | 71 | ]; |
72 | 72 | $config['modules']['fixture'] = [ // Fixture generation command line. |
73 | - 'class' => \yii\faker\FixtureController::class, |
|
74 | - 'templatePath' => 'tests/fixtures/templates', |
|
75 | - 'fixtureDataPath' => 'tests/fixtures/data', |
|
76 | - 'namespace' => 'app\tests\fixtures', |
|
77 | - 'count' => 10, |
|
73 | + 'class' => \yii\faker\FixtureController::class, |
|
74 | + 'templatePath' => 'tests/fixtures/templates', |
|
75 | + 'fixtureDataPath' => 'tests/fixtures/data', |
|
76 | + 'namespace' => 'app\tests\fixtures', |
|
77 | + 'count' => 10, |
|
78 | 78 | ]; |
79 | 79 | } |
80 | 80 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $config['modules']['gii'] = [ |
70 | 70 | 'class' => 'yii\gii\Module', |
71 | 71 | ]; |
72 | - $config['modules']['fixture'] = [ // Fixture generation command line. |
|
72 | + $config['modules']['fixture'] = [// Fixture generation command line. |
|
73 | 73 | 'class' => \yii\faker\FixtureController::class, |
74 | 74 | 'templatePath' => 'tests/fixtures/templates', |
75 | 75 | 'fixtureDataPath' => 'tests/fixtures/data', |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require __DIR__.'/../config/env.php'; |
|
3 | +require __DIR__ . '/../config/env.php'; |
|
4 | 4 | |
5 | 5 | require __DIR__ . '/../vendor/autoload.php'; |
6 | 6 | require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; |