Passed
Push — develop ( 8175c8...3980d8 )
by Andrew
06:14 queued 03:04
created
src/controllers/ChartsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 ])
80 80
                 ->where(['between', 'dateCreated', $start, $end])
81 81
                 ->andWhere(['not', [$column => null]]);
82
-            if ((int)$siteId !== 0) {
82
+            if ((int) $siteId !== 0) {
83 83
                 $query->andWhere(['siteId' => $siteId]);
84 84
             }
85 85
             if ($pageUrl !== '') {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                 ])
97 97
                 ->where(['between', 'dateCreated', $start, $end])
98 98
                 ->andWhere(['not', [$column => null]]);
99
-            if ((int)$siteId !== 0) {
99
+            if ((int) $siteId !== 0) {
100 100
                 $query->andWhere(['siteId' => $siteId]);
101 101
             }
102 102
             $stats = $query->all();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         // Massage the data
105 105
         if ($stats) {
106 106
             foreach ($stats as &$stat) {
107
-                $stat['cnt'] = (int)$stat['cnt'];
107
+                $stat['cnt'] = (int) $stat['cnt'];
108 108
             }
109 109
             $data = $stats[0];
110 110
         }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                 ])
151 151
                 ->where(['between', 'dateCreated', $start, $end])
152 152
                 ->andWhere(['not', [$column => null]]);
153
-            if ((int)$siteId !== 0) {
153
+            if ((int) $siteId !== 0) {
154 154
                 $query->andWhere(['siteId' => $siteId]);
155 155
             }
156 156
             $query
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 ])
172 172
                 ->where(['between', 'dateCreated', $start, $end])
173 173
                 ->andWhere(['not', [$column => null]]);
174
-            if ((int)$siteId !== 0) {
174
+            if ((int) $siteId !== 0) {
175 175
                 $query->andWhere(['siteId' => $siteId]);
176 176
             }
177 177
             $query
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         // Massage the data
184 184
         if ($stats) {
185 185
             foreach ($stats as &$stat) {
186
-                $stat['cnt'] = (int)$stat['cnt'];
186
+                $stat['cnt'] = (int) $stat['cnt'];
187 187
                 $stat['detailPageUrl'] = UrlHelper::cpUrl('webperf/page-detail', [
188 188
                     'pageUrl' => $stat['url'],
189 189
                     'siteId' => $siteId,
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                 ])
251 251
                 ->where(['between', 'dateCreated', $start, $end])
252 252
                 ;
253
-            if ((int)$siteId !== 0) {
253
+            if ((int) $siteId !== 0) {
254 254
                 $query->andWhere(['siteId' => $siteId]);
255 255
             }
256 256
             if ($pageUrl !== '') {
Please login to merge, or discard this patch.
src/controllers/TablesController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             ->offset($offset)
105 105
             ->where(['between', 'dateCreated', $start, $end])
106 106
         ;
107
-        if ((int)$siteId !== 0) {
107
+        if ((int) $siteId !== 0) {
108 108
             $query->andWhere(['siteId' => $siteId]);
109 109
         }
110 110
         if ($filter !== '') {
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
             $index = 1;
144 144
             foreach ($stats as &$stat) {
145 145
                 $stat['id'] = $index++;
146
-                $stat['cnt'] = (int)$stat['cnt'];
147
-                $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad;
146
+                $stat['cnt'] = (int) $stat['cnt'];
147
+                $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad;
148 148
                 // Decode any emojis in the title
149 149
                 if (!empty($stat['title'])) {
150 150
                     $stat['title'] = html_entity_decode($stat['title'], ENT_NOQUOTES, 'UTF-8');
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             ->where(['url' => $pageUrl])
242 242
             ->andWhere(['between', 'dateCreated', $start, $end])
243 243
         ;
244
-        if ((int)$siteId !== 0) {
244
+        if ((int) $siteId !== 0) {
245 245
             $query->andWhere(['siteId' => $siteId]);
246 246
         }
247 247
         if ($filter !== '') {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                     $stat['type'] = 'frontend';
274 274
                 }
275 275
                 if ($stat['pageLoad'] > $maxTotalPageLoad) {
276
-                    $maxTotalPageLoad = (int)$stat['pageLoad'];
276
+                    $maxTotalPageLoad = (int) $stat['pageLoad'];
277 277
                 }
278 278
             }
279 279
             // Massage the stats
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
                     $date = DateTimeHelper::toDateTime($stats['dateCreated']);
283 283
                     $stats['dateCreated'] = $date->format('Y-m-d H:i:s');
284 284
                 }
285
-                $stat['mobile'] = (bool)$stat['mobile'];
286
-                $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad;
285
+                $stat['mobile'] = (bool) $stat['mobile'];
286
+                $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad;
287 287
                 // Decode any emojis in the title
288 288
                 if (!empty($stat['title'])) {
289 289
                     $stat['title'] = html_entity_decode($stat['title'], ENT_NOQUOTES, 'UTF-8');
Please login to merge, or discard this patch.
src/services/Recommendations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
         if (!empty($pageUrl)) {
108 108
             $query->andWhere(['url' => $pageUrl]);
109 109
         }
110
-        if ((int)$siteId !== 0) {
110
+        if ((int) $siteId !== 0) {
111 111
             $query->andWhere(['siteId' => $siteId]);
112 112
         }
113 113
         $stats = $query->all();
Please login to merge, or discard this patch.
src/recommendations/CraftTotalTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         // See if there are too many database queries
38 38
         if ($this->sample->craftTotalMs >= self::MAX_TOTAL_TIME) {
39
-            $displayCraftTotalMs = ($this->sample->craftTotalMs / 1000) . 's';
39
+            $displayCraftTotalMs = ($this->sample->craftTotalMs / 1000).'s';
40 40
             $this->hasRecommendation = true;
41 41
             $this->summary = Craft::t(
42 42
                 'webperf',
Please login to merge, or discard this patch.
src/recommendations/CraftTwigTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         // See if there are too many database queries
38 38
         if ($this->sample->craftTwigMs >= self::MAX_TWIG_TIME) {
39
-            $displayCraftTwigMs = ($this->sample->craftTwigMs / 1000) . 's';
39
+            $displayCraftTwigMs = ($this->sample->craftTwigMs / 1000).'s';
40 40
             $this->hasRecommendation = true;
41 41
             $this->summary = Craft::t(
42 42
                 'webperf',
Please login to merge, or discard this patch.
src/recommendations/CraftQueryTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         // See if there are too many database queries
38 38
         if ($this->sample->craftDbMs >= self::MAX_QUERY_TIME) {
39
-            $displayCraftDbMs = ($this->sample->craftDbMs / 1000) . 's';
39
+            $displayCraftDbMs = ($this->sample->craftDbMs / 1000).'s';
40 40
             $this->hasRecommendation = true;
41 41
             $this->summary = Craft::t(
42 42
                 'webperf',
Please login to merge, or discard this patch.
src/recommendations/DomInteractive.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         // See if there are too many database queries
38 38
         if ($this->sample->domInteractive >= self::MAX_DOM_INTERACTIVE_TIME) {
39
-            $displayDomInteractive = ($this->sample->domInteractive / 1000) . 's';
39
+            $displayDomInteractive = ($this->sample->domInteractive / 1000).'s';
40 40
             $this->hasRecommendation = true;
41 41
             $this->summary = Craft::t(
42 42
                 'webperf',
Please login to merge, or discard this patch.
src/recommendations/FirstByte.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         // See if there are too many database queries
38 38
         if ($this->sample->firstByte >= self::MAX_TOTAL_TIME) {
39
-            $displayFirstByte = ($this->sample->firstByte / 1000) . 's';
39
+            $displayFirstByte = ($this->sample->firstByte / 1000).'s';
40 40
             $this->hasRecommendation = true;
41 41
             $this->summary = Craft::t(
42 42
                 'webperf',
Please login to merge, or discard this patch.
src/recommendations/FirstContentfulPaint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         // See if there are too many database queries
38 38
         if ($this->sample->firstContentfulPaint >= self::MAX_FIRST_CONTENTFUL_PAINT_TIME) {
39
-            $displayFirstContentfulPaint = ($this->sample->firstContentfulPaint / 1000) . 's';
39
+            $displayFirstContentfulPaint = ($this->sample->firstContentfulPaint / 1000).'s';
40 40
             $this->hasRecommendation = true;
41 41
             $this->summary = Craft::t(
42 42
                 'webperf',
Please login to merge, or discard this patch.