@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | 'tag.*', |
| 123 | 123 | 'count(tag.id) as occurs', |
| 124 | 124 | ]) |
| 125 | - ->innerJoinWith(['media' => function (Query $q) use ($model) { |
|
| 125 | + ->innerJoinWith(['media' => function(Query $q) use ($model) { |
|
| 126 | 126 | $q->andWhere(['media.account_id' => $model->id]); |
| 127 | 127 | }]) |
| 128 | 128 | ->groupBy('tag.id'), |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | 'account.*', |
| 155 | 155 | 'count(account.id) as occurs', |
| 156 | 156 | ]) |
| 157 | - ->innerJoinWith(['mediaAccounts.media' => function (Query $q) use ($model) { |
|
| 157 | + ->innerJoinWith(['mediaAccounts.media' => function(Query $q) use ($model) { |
|
| 158 | 158 | $q->andWhere(['media.account_id' => $model->id]); |
| 159 | 159 | }]) |
| 160 | 160 | ->groupBy('account.id'), |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | BaseActiveRecord::EVENT_BEFORE_UPDATE => ['uid'], |
| 65 | 65 | ], |
| 66 | 66 | 'preserveNonEmptyValues' => true, |
| 67 | - 'value' => function () { |
|
| 67 | + 'value' => function() { |
|
| 68 | 68 | do { |
| 69 | 69 | $uid = Yii::$app->security->generateRandomString(64); |
| 70 | 70 | $uidExist = static::find() |
@@ -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}"); |