Passed
Push — master ( 420524...d9222d )
by Paweł
02:51
created
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.
web/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__.'/../config/env.php';
3
+require __DIR__ . '/../config/env.php';
4 4
 
5 5
 require __DIR__ . '/../vendor/autoload.php';
6 6
 require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
Please login to merge, or discard this patch.
components/CategoryManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $accounts = $accounts instanceof Account ? [$accounts->id] : ArrayHelper::getColumn($accounts, 'id');
44 44
 
45 45
         $q = Category::find()
46
-            ->innerJoin('account_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int)$user->id)
46
+            ->innerJoin('account_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int) $user->id)
47 47
             ->andFilterWhere(['ac.account_id' => $accounts]);
48 48
 
49 49
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $tags = $tags instanceof Tag ? [$tags->id] : ArrayHelper::getColumn($tags, 'id');
62 62
 
63 63
         $q = Category::find()
64
-            ->innerJoin('tag_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int)$user->id)
64
+            ->innerJoin('tag_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int) $user->id)
65 65
             ->andFilterWhere(['ac.tag_id' => $tags]);
66 66
 
67 67
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public function addToAccount(Account $account, array $categories, User $user)
101 101
     {
102 102
         $this->saveCategories($categories);
103
-        $rows = array_map(function ($categoryId) use ($account, $user) {
103
+        $rows = array_map(function($categoryId) use ($account, $user) {
104 104
             return [
105 105
                 $account->id,
106 106
                 $categoryId,
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
     public function saveCategories(array $categories)
161 161
     {
162
-        $rows = array_map(function ($category) {
162
+        $rows = array_map(function($category) {
163 163
             return [$category];
164 164
         }, $categories);
165 165
 
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
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             ->andWhere(['username' => $usernames])
53 53
             ->column();
54 54
 
55
-        $rows = array_map(function ($id) use ($media) {
55
+        $rows = array_map(function($id) use ($media) {
56 56
             return [
57 57
                 $media->id,
58 58
                 $id,
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function saveUsernames(array $usernames)
72 72
     {
73 73
         $createdAt = (new DateTime())->format('Y-m-d H:i:s');
74
-        $rows = array_map(function ($username) use ($createdAt) {
74
+        $rows = array_map(function($username) use ($createdAt) {
75 75
             return [
76 76
                 $username,
77 77
                 $createdAt,
Please login to merge, or discard this patch.
components/TagManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $this->saveTags($tags);
44 44
 
45
-        $rows = array_map(function ($id) use ($media) {
45
+        $rows = array_map(function($id) use ($media) {
46 46
             return [
47 47
                 $media->id,
48 48
                 $id,
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function saveTags(array $tags)
64 64
     {
65 65
         $createdAt = (new DateTime())->format('Y-m-d H:i:s');
66
-        $rows = array_map(function ($tag) use ($createdAt) {
66
+        $rows = array_map(function($tag) use ($createdAt) {
67 67
             return [
68 68
                 $tag,
69 69
                 Inflector::slug($tag),
Please login to merge, or discard this patch.
components/updaters/AccountUpdater.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function setIdents(Account $account)
42 42
     {
43 43
         $this->account->username = $account->username;
44
-        $this->account->instagram_id = (string)$account->id;
44
+        $this->account->instagram_id = (string) $account->id;
45 45
 
46 46
         return $this;
47 47
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function setIsInvalid(?int $invalidationType = null)
85 85
     {
86 86
         $this->account->is_valid = 0;
87
-        $this->account->invalidation_count = (int)$this->account->invalidation_count + 1;
87
+        $this->account->invalidation_count = (int) $this->account->invalidation_count + 1;
88 88
         $this->account->invalidation_type_id = $invalidationType;
89 89
 
90 90
         return $this;
Please login to merge, or discard this patch.
components/updaters/TagUpdater.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     public function setIsInvalid(?int $invalidationType = null)
55 55
     {
56 56
         $this->tag->is_valid = 0;
57
-        $this->tag->invalidation_count = (int)$this->tag->invalidation_count + 1;
57
+        $this->tag->invalidation_count = (int) $this->tag->invalidation_count + 1;
58 58
         $this->tag->invalidation_type_id = $invalidationType;
59 59
 
60 60
         return $this;
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
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
                     $job = JobFactory::createAccountUpdate($account);
120 120
                     $queue->push($job);
121 121
 
122
-                    $categories = array_filter((array)$form->categories);
122
+                    $categories = array_filter((array) $form->categories);
123 123
                     if ($categories) {
124 124
                         /** @var \app\models\User $identity */
125 125
                         $identity = Yii::$app->user->identity;
Please login to merge, or discard this patch.
config/container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 return [
8 8
     'definitions' => [
9 9
         TimestampBehavior::class => [
10
-            'value' => function () {
10
+            'value' => function() {
11 11
                 return (new DateTime('now', new DateTimeZone('UTC')))->format('Y-m-d H:i:s');
12 12
             },
13 13
         ],
Please login to merge, or discard this patch.