@@ -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 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | 'and', |
65 | 65 | ['active' => 1], |
66 | 66 | ['reservation_uid' => null], |
67 | - ['<=', 'updated_at', (new \DateTime(sprintf('-%d seconds', (int)$this->restTime)))->format('Y-m-d H:i:s')], |
|
67 | + ['<=', 'updated_at', (new \DateTime(sprintf('-%d seconds', (int) $this->restTime)))->format('Y-m-d H:i:s')], |
|
68 | 68 | ]; |
69 | 69 | |
70 | 70 | if ($model->proxy_id) { |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | if ($media->caption) { |
47 | - $tags = (array)Text::getTags($media->caption); |
|
47 | + $tags = (array) Text::getTags($media->caption); |
|
48 | 48 | $this->updateTags($media, $tags); |
49 | 49 | |
50 | - $usernames = (array)Text::getUsernames($media->caption); |
|
50 | + $usernames = (array) Text::getUsernames($media->caption); |
|
51 | 51 | // ignore owner of media |
52 | 52 | ArrayHelper::removeValue($usernames, $this->account->username); |
53 | 53 | $this->updateUsernames($media, $usernames); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | |
116 | 116 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
117 | - $rows = array_map(function ($id) use ($media, $createdAt) { |
|
117 | + $rows = array_map(function($id) use ($media, $createdAt) { |
|
118 | 118 | return [ |
119 | 119 | $media->id, |
120 | 120 | $id, |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $manager->saveTags($tags); |
144 | 144 | |
145 | 145 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
146 | - $rows = array_map(function ($id) use ($media, $createdAt) { |
|
146 | + $rows = array_map(function($id) use ($media, $createdAt) { |
|
147 | 147 | return [ |
148 | 148 | $media->id, |
149 | 149 | $id, |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | ['class' => \yii\grid\SerialColumn::class], |
31 | 31 | [ |
32 | 32 | 'attribute' => 'username', |
33 | - 'content' => function (\app\models\Account $model) { |
|
33 | + 'content' => function(\app\models\Account $model) { |
|
34 | 34 | $html = []; |
35 | 35 | $html[] = Html::a($model->displayName, ['account/dashboard', 'id' => $model->id]); |
36 | 36 | $html[] = Html::a('<span class="fa fa-external-link text-sm"></span>', Url::account($model->username), ['target' => '_blank']); |
37 | 37 | |
38 | - if ($model->accounts_monitoring_level){ |
|
38 | + if ($model->accounts_monitoring_level) { |
|
39 | 39 | $html[] = sprintf('<span class="fa fa-magic text-muted pull-right" title="monitoring level: %s"></span>', $model->accounts_monitoring_level); |
40 | 40 | } |
41 | 41 | if ($model->disabled) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | ], |
69 | 69 | [ |
70 | 70 | 'attribute' => 's_tags', |
71 | - 'value' => function (Account $model) { |
|
71 | + 'value' => function(Account $model) { |
|
72 | 72 | $tags = $model->getTags()->select('tag.name')->column(); |
73 | 73 | if ($tags) { |
74 | 74 | return implode(', ', $tags); |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $account = $accountManager->monitor($username, $form->proxy_id, $form->proxy_tag_id); |
76 | 76 | if (!$account->hasErrors()) { |
77 | 77 | \Yii::$app->session->setFlash('success', 'OK!'); |
78 | - $accountManager->updateTags($account, (array)$form->tags); |
|
78 | + $accountManager->updateTags($account, (array) $form->tags); |
|
79 | 79 | } else { |
80 | 80 | \Yii::error('Validation error: ' . json_encode($account->errors), __METHOD__); |
81 | 81 | \Yii::$app->session->setFlash('error', "ERR! {$username}"); |