Passed
Push — develop ( 3980d8...18eea7 )
by Andrew
04:36
created
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/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.
src/controllers/ChartsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 ])
83 83
                 ->where(['between', 'dateCreated', $start, $end])
84 84
                 ->andWhere(['not', [$column => null]]);
85
-            if ((int)$siteId !== 0) {
85
+            if ((int) $siteId !== 0) {
86 86
                 $query->andWhere(['siteId' => $siteId]);
87 87
             }
88 88
             if ($pageUrl !== '') {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 ])
101 101
                 ->where(['between', 'dateCreated', $start, $end])
102 102
                 ->andWhere(['not', [$column => null]]);
103
-            if ((int)$siteId !== 0) {
103
+            if ((int) $siteId !== 0) {
104 104
                 $query->andWhere(['siteId' => $siteId]);
105 105
             }
106 106
             if ($pageUrl !== '') {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         // Massage the data
112 112
         if ($stats) {
113 113
             foreach ($stats as &$stat) {
114
-                $stat['cnt'] = (int)$stat['cnt'];
114
+                $stat['cnt'] = (int) $stat['cnt'];
115 115
             }
116 116
             $data = $stats[0];
117 117
         }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 ])
158 158
                 ->where(['between', 'dateCreated', $start, $end])
159 159
                 ->andWhere(['not', [$column => null]]);
160
-            if ((int)$siteId !== 0) {
160
+            if ((int) $siteId !== 0) {
161 161
                 $query->andWhere(['siteId' => $siteId]);
162 162
             }
163 163
             $query
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                 ])
179 179
                 ->where(['between', 'dateCreated', $start, $end])
180 180
                 ->andWhere(['not', [$column => null]]);
181
-            if ((int)$siteId !== 0) {
181
+            if ((int) $siteId !== 0) {
182 182
                 $query->andWhere(['siteId' => $siteId]);
183 183
             }
184 184
             $query
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         // Massage the data
191 191
         if ($stats) {
192 192
             foreach ($stats as &$stat) {
193
-                $stat['cnt'] = (int)$stat['cnt'];
193
+                $stat['cnt'] = (int) $stat['cnt'];
194 194
                 $stat['detailPageUrl'] = UrlHelper::cpUrl('webperf/page-detail', [
195 195
                     'pageUrl' => $stat['url'],
196 196
                     'siteId' => $siteId,
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                 ])
258 258
                 ->where(['between', 'dateCreated', $start, $end])
259 259
                 ;
260
-            if ((int)$siteId !== 0) {
260
+            if ((int) $siteId !== 0) {
261 261
                 $query->andWhere(['siteId' => $siteId]);
262 262
             }
263 263
             if ($pageUrl !== '') {
Please login to merge, or discard this patch.
src/services/Recommendations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             if (!empty($pageUrl)) {
125 125
                 $query->andWhere(['url' => $pageUrl]);
126 126
             }
127
-            if ((int)$siteId !== 0) {
127
+            if ((int) $siteId !== 0) {
128 128
                 $query->andWhere(['siteId' => $siteId]);
129 129
             }
130 130
             $stats = $query->all();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             if (!empty($pageUrl)) {
158 158
                 $query->andWhere(['url' => $pageUrl]);
159 159
             }
160
-            if ((int)$siteId !== 0) {
160
+            if ((int) $siteId !== 0) {
161 161
                 $query->andWhere(['siteId' => $siteId]);
162 162
             }
163 163
             $stats = $query->all();
Please login to merge, or discard this patch.