@@ -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 | ], |
@@ -66,7 +66,7 @@ |
||
66 | 66 | { |
67 | 67 | static::$proxies = static::$proxies ?? Proxy::find()->joinWith('tags')->active()->all(); |
68 | 68 | |
69 | - return ArrayHelper::map(static::$proxies, 'id', function (Proxy $model) { |
|
69 | + return ArrayHelper::map(static::$proxies, 'id', function(Proxy $model) { |
|
70 | 70 | $tags = ArrayHelper::getColumn($model->tags, 'name'); |
71 | 71 | |
72 | 72 | return $model->ip . ($tags ? ' # ' . implode(',', $tags) : ''); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'yii\queue\db\migrations', |
63 | 63 | ], |
64 | 64 | ], |
65 | - 'fixture' => [ // Fixture generation command line. |
|
65 | + 'fixture' => [// Fixture generation command line. |
|
66 | 66 | 'class' => \yii\faker\FixtureController::class, |
67 | 67 | 'templatePath' => 'tests/fixtures/templates', |
68 | 68 | 'fixtureDataPath' => 'tests/fixtures/data', |
@@ -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 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public function init() |
48 | 48 | { |
49 | 49 | parent::init(); |
50 | - $userId = (int)\Yii::$app->user->id; |
|
50 | + $userId = (int) \Yii::$app->user->id; |
|
51 | 51 | $this->modelTags = $this->getTags($userId, $this->model->id); |
52 | 52 | $this->allTags = $this->getTags($userId); |
53 | 53 | $this->formAction = $this->formAction ?: ['tags', 'id' => $this->model->id]; |
@@ -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']); |
@@ -122,7 +122,7 @@ |
||
122 | 122 | $job = JobFactory::createAccountUpdate($account); |
123 | 123 | $queue->push($job); |
124 | 124 | |
125 | - $tags = array_filter((array)$form->tags); |
|
125 | + $tags = array_filter((array) $form->tags); |
|
126 | 126 | if ($tags) { |
127 | 127 | $tagManager = \Yii::createObject(TagManager::class); |
128 | 128 | $tagManager->saveForAccount($account, $tags, \Yii::$app->user->id); |