Passed
Push — master ( bdcc3b...3d1e52 )
by Paweł
02:17
created
commands/StatsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     private function whereInterval($interval): Expression
139 139
     {
140 140
         return new Expression('DATE_FORMAT(created_at, \'%Y-%m-%d %H\') > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL :interval HOUR), \'%Y-%m-%d %H\')', [
141
-            'interval' => (int)$interval,
141
+            'interval' => (int) $interval,
142 142
         ]);
143 143
     }
144 144
 }
145 145
\ No newline at end of file
Please login to merge, or discard this patch.
components/UserAgent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         /** @var \yii\caching\Cache $cache */
26 26
         $cache = Instance::ensure($this->cache);
27 27
 
28
-        $items = $cache->getOrSet(__METHOD__, function (Cache $cache) {
28
+        $items = $cache->getOrSet(__METHOD__, function(Cache $cache) {
29 29
             return (new \jakim\ua\UserAgent())->fetch();
30 30
         }, 60 * 60 * 24 * 30);
31 31
 
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
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             return $this->fetchContent($url, $tag);
54 54
         }
55 55
 
56
-        return $this->cache->getOrSet([$url], function () use ($url, $tag) {
56
+        return $this->cache->getOrSet([$url], function() use ($url, $tag) {
57 57
             return $this->fetchContent($url, $tag);
58 58
         }, 3600);
59 59
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function saveTags(array $tags)
121 121
     {
122 122
         $createdAt = (new \DateTime())->format('Y-m-d H:i:s');
123
-        $rows = array_map(function ($tag) use ($createdAt) {
123
+        $rows = array_map(function($tag) use ($createdAt) {
124 124
             return [
125 125
                 $tag,
126 126
                 Inflector::slug($tag),
Please login to merge, or discard this patch.
config/web.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         'class' => 'yii\gii\Module',
82 82
         // uncomment the following to add your IP if you are not connecting from localhost.
83 83
         //'allowedIPs' => ['127.0.0.1', '::1'],
84
-        'generators' => [ //here
84
+        'generators' => [//here
85 85
             'crud' => [
86 86
                 'class' => 'yii\gii\generators\crud\Generator',
87 87
                 'templates' => [
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
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 return [
4 4
     'definitions' => [
5 5
         \yii\behaviors\TimestampBehavior::class => [
6
-            'value' => function () {
6
+            'value' => function() {
7 7
                 return (new DateTime('now', new DateTimeZone('UTC')))->format('Y-m-d H:i:s');
8 8
             },
9 9
         ],
Please login to merge, or discard this patch.
modules/admin/controllers/AccountController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                     'tag.*',
123 123
                     'count(tag.id) as occurs',
124 124
                 ])
125
-                ->innerJoinWith(['media' => function (Query $q) use ($model) {
125
+                ->innerJoinWith(['media' => function(Query $q) use ($model) {
126 126
                     $q->andWhere(['media.account_id' => $model->id]);
127 127
                 }])
128 128
                 ->groupBy('tag.id'),
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                     'account.*',
155 155
                     'count(account.id) as occurs',
156 156
                 ])
157
-                ->innerJoinWith(['mediaAccounts.media' => function (Query $q) use ($model) {
157
+                ->innerJoinWith(['mediaAccounts.media' => function(Query $q) use ($model) {
158 158
                     $q->andWhere(['media.account_id' => $model->id]);
159 159
                 }])
160 160
                 ->groupBy('account.id'),
Please login to merge, or discard this patch.
modules/admin/views/account/dashboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
                                     [
167 167
                                         'label' => $model->lastAccountStats->getAttributeLabel('er'),
168 168
                                         'yAxisID' => 'er',
169
-                                        'data' => array_map(function ($item) {
169
+                                        'data' => array_map(function($item) {
170 170
                                             return number_format($item * 100, 2);
171 171
                                         }, ArrayHelper::getColumn($monthAccountStats, 'er')),
172 172
                                         'fill' => false,
Please login to merge, or discard this patch.
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.
modules/admin/views/monitoring/accounts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
                         return Html::a($model->usernamePrefixed, ['account/dashboard', 'id' => $model->id]) . ' '
35 35
                             . Html::a('<span class="fa fa-external-link text-sm"></span>', Url::account($model->username), ['target' => '_blank']);
36 36
                     },
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 ],
59 59
                 [
60 60
                     'attribute' => 's_tags',
61
-                    'value' => function (Account $model) {
61
+                    'value' => function(Account $model) {
62 62
                         $tags = $model->getTags()->select('tag.name')->column();
63 63
                         if ($tags) {
64 64
                             return implode(', ', $tags);
Please login to merge, or discard this patch.