@@ -30,7 +30,7 @@ |
||
| 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']); |
@@ -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) { |
@@ -59,13 +59,13 @@ |
||
| 59 | 59 | return false; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - $tags = (array)Text::getTags($media->caption); |
|
| 62 | + $tags = (array) Text::getTags($media->caption); |
|
| 63 | 63 | if ($tags) { |
| 64 | 64 | $manager = \Yii::createObject(TagManager::class); |
| 65 | 65 | $manager->saveForMedia($media, $tags); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $usernames = (array)Text::getUsernames($media->caption); |
|
| 68 | + $usernames = (array) Text::getUsernames($media->caption); |
|
| 69 | 69 | if ($usernames) { |
| 70 | 70 | // ignore owner of media |
| 71 | 71 | ArrayHelper::removeValue($usernames, $account->username); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->saveUsernames($usernames); |
| 64 | 64 | |
| 65 | 65 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 66 | - $rows = array_map(function ($id) use ($media, $createdAt) { |
|
| 66 | + $rows = array_map(function($id) use ($media, $createdAt) { |
|
| 67 | 67 | return [ |
| 68 | 68 | $media->id, |
| 69 | 69 | $id, |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | public function saveUsernames(array $usernames) |
| 88 | 88 | { |
| 89 | 89 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 90 | - $rows = array_map(function ($username) use ($createdAt) { |
|
| 90 | + $rows = array_map(function($username) use ($createdAt) { |
|
| 91 | 91 | return [ |
| 92 | 92 | $username, |
| 93 | 93 | $createdAt, |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $this->saveTags($tags); |
| 42 | 42 | |
| 43 | 43 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 44 | - $rows = array_map(function ($id) use ($media, $createdAt) { |
|
| 44 | + $rows = array_map(function($id) use ($media, $createdAt) { |
|
| 45 | 45 | return [ |
| 46 | 46 | $media->id, |
| 47 | 47 | $id, |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 90 | - $rows = array_map(function ($tagId) use ($account, $createdAt) { |
|
| 90 | + $rows = array_map(function($tagId) use ($account, $createdAt) { |
|
| 91 | 91 | return [ |
| 92 | 92 | $account->id, |
| 93 | 93 | $tagId, |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | public function saveTags(array $tags) |
| 112 | 112 | { |
| 113 | 113 | $createdAt = (new \DateTime())->format('Y-m-d H:i:s'); |
| 114 | - $rows = array_map(function ($tag) use ($createdAt) { |
|
| 114 | + $rows = array_map(function($tag) use ($createdAt) { |
|
| 115 | 115 | return [ |
| 116 | 116 | $tag, |
| 117 | 117 | Inflector::slug($tag), |
@@ -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 | } |
@@ -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); |
|
| 82 | + $tagManager->saveForAccount($account, (array) $form->tags); |
|
| 83 | 83 | } else { |
| 84 | 84 | \Yii::error('Validation error: ' . json_encode($account->errors), __METHOD__); |
| 85 | 85 | \Yii::$app->session->setFlash('error', "ERR! {$username}"); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public function setModels($models) |
| 58 | 58 | { |
| 59 | - $this->models = (array)$models; |
|
| 59 | + $this->models = (array) $models; |
|
| 60 | 60 | |
| 61 | 61 | return $this; |
| 62 | 62 | } |