Passed
Push — master ( 6b49ff...b93f48 )
by Paweł
05:24
created
modules/admin/views/monitoring/tags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
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
                 ],
Please login to merge, or discard this patch.
components/MediaManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,13 +59,13 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
components/AccountManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
components/TagManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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),
Please login to merge, or discard this patch.
widgets/ProgressChart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
modules/admin/controllers/MonitoringController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
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}");
Please login to merge, or discard this patch.