@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $this->saveTags($tags); |
| 43 | 43 | |
| 44 | 44 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 45 | - $rows = array_map(function ($id) use ($media, $createdAt) { |
|
| 45 | + $rows = array_map(function($id) use ($media, $createdAt) { |
|
| 46 | 46 | return [ |
| 47 | 47 | $media->id, |
| 48 | 48 | $id, |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $userIds = $this->getUserIds($userId); |
| 91 | 91 | $tagIds = $this->getTagIds($tags); |
| 92 | 92 | foreach ($userIds as $userId) { |
| 93 | - $tmp = array_map(function ($tagId) use ($account, $userId, $createdAt) { |
|
| 93 | + $tmp = array_map(function($tagId) use ($account, $userId, $createdAt) { |
|
| 94 | 94 | return [ |
| 95 | 95 | $account->id, |
| 96 | 96 | $tagId, |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | public function saveTags(array $tags) |
| 116 | 116 | { |
| 117 | 117 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 118 | - $rows = array_map(function ($tag) use ($createdAt) { |
|
| 118 | + $rows = array_map(function($tag) use ($createdAt) { |
|
| 119 | 119 | return [ |
| 120 | 120 | $tag, |
| 121 | 121 | Inflector::slug($tag), |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ->andWhere(['active' => 1]) |
| 161 | 161 | ->column(); |
| 162 | 162 | } else { |
| 163 | - $userIds = (array)$userId; |
|
| 163 | + $userIds = (array) $userId; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | return $userIds; |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | if (!$account->hasErrors()) { |
| 80 | 80 | \Yii::$app->session->setFlash('success', 'OK!'); |
| 81 | 81 | $tagManager = \Yii::createObject(TagManager::class); |
| 82 | - $tagManager->saveForAccount($account, (array)$form->tags, \Yii::$app->user->id); |
|
| 82 | + $tagManager->saveForAccount($account, (array) $form->tags, \Yii::$app->user->id); |
|
| 83 | 83 | } else { |
| 84 | 84 | \Yii::error('Validation error: ' . json_encode($account->errors), __METHOD__); |
| 85 | 85 | \Yii::$app->session->setFlash('error', "ERR! {$username}"); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | [ |
| 34 | 34 | 'attribute' => 'username', |
| 35 | 35 | 'format' => 'raw', |
| 36 | - 'value' => function (Account $model, $key, $index, $column) { |
|
| 36 | + 'value' => function(Account $model, $key, $index, $column) { |
|
| 37 | 37 | if ($model->monitoring) { |
| 38 | 38 | $value = Html::a($model->usernamePrefixed, ['account/dashboard', 'id' => $model->id]); |
| 39 | 39 | } else { |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | ], |
| 46 | 46 | [ |
| 47 | 47 | 'label' => (new \app\models\AccountStats())->getAttributeLabel('er'), |
| 48 | - 'value' => function (Account $account) use ($formatter) { |
|
| 48 | + 'value' => function(Account $account) use ($formatter) { |
|
| 49 | 49 | if ($account->monitoring && $account->lastAccountStats) { |
| 50 | 50 | $er = $account->lastAccountStats->er; |
| 51 | 51 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | 'occurs', |
| 59 | 59 | [ |
| 60 | 60 | 'format' => 'raw', |
| 61 | - 'value' => function (Account $account) use ($model) { |
|
| 61 | + 'value' => function(Account $account) use ($model) { |
|
| 62 | 62 | return OnOffMonitoringButton::widget([ |
| 63 | 63 | 'model' => $account, |
| 64 | 64 | 'form' => new AccountMonitoringForm([ |
@@ -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([ |