@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | [ |
28 | 28 | 'attribute' => 'name', |
29 | - 'content' => function (\app\models\Tag $model) { |
|
29 | + 'content' => function(\app\models\Tag $model) { |
|
30 | 30 | return Html::a($model->namePrefixed, ['tag/stats', 'id' => $model->id]); |
31 | 31 | }, |
32 | 32 | ], |
@@ -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}"); |