@@ -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 | |
@@ -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) { |
@@ -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}"); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 72 | - $rows = array_map(function ($id) use ($media, $createdAt) { |
|
| 72 | + $rows = array_map(function($id) use ($media, $createdAt) { |
|
| 73 | 73 | return [ |
| 74 | 74 | $media->id, |
| 75 | 75 | $id, |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $manager->saveTags($tags); |
| 99 | 99 | |
| 100 | 100 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 101 | - $rows = array_map(function ($id) use ($media, $createdAt) { |
|
| 101 | + $rows = array_map(function($id) use ($media, $createdAt) { |
|
| 102 | 102 | return [ |
| 103 | 103 | $media->id, |
| 104 | 104 | $id, |
@@ -123,10 +123,10 @@ discard block |
||
| 123 | 123 | protected function extractRelatedData(Media $media): void |
| 124 | 124 | { |
| 125 | 125 | if ($media->caption) { |
| 126 | - $tags = (array)Text::getTags($media->caption); |
|
| 126 | + $tags = (array) Text::getTags($media->caption); |
|
| 127 | 127 | $this->updateTags($media, $tags); |
| 128 | 128 | |
| 129 | - $usernames = (array)Text::getUsernames($media->caption); |
|
| 129 | + $usernames = (array) Text::getUsernames($media->caption); |
|
| 130 | 130 | // ignore owner of media |
| 131 | 131 | ArrayHelper::removeValue($usernames, $this->account->username); |
| 132 | 132 | $this->updateUsernames($media, $usernames); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | 'monitoring', |
| 36 | 36 | 'disabled', |
| 37 | 37 | 'name', |
| 38 | - 'profile_pic_url' => function () { |
|
| 38 | + 'profile_pic_url' => function() { |
|
| 39 | 39 | return Url::to($this->profile_pic_url, true); |
| 40 | 40 | }, |
| 41 | 41 | 'full_name', |
@@ -30,12 +30,12 @@ |
||
| 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) { |