Passed
Push — v1 ( 7034ea...a04106 )
by Andrew
06:43 queued 03:25
created
src/controllers/TablesController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
             // Compute the largest page load time
125 125
             $maxTotalPageLoad = 0;
126 126
             foreach ($stats as &$stat) {
127
-             // Determine the stat type
127
+                // Determine the stat type
128 128
                 if (!empty($stat['pageLoad']) && !empty($stat['craftTotalMs'])) {
129 129
                     $stat['type'] = 'both';
130 130
                 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             ->offset($offset)
104 104
             ->where(['between', 'dateUpdated', $start, $end])
105 105
         ;
106
-        if ((int)$siteId !== 0) {
106
+        if ((int) $siteId !== 0) {
107 107
             $query->andWhere(['siteId' => $siteId]);
108 108
         }
109 109
         if ($filter !== '') {
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
             $index = 1;
143 143
             foreach ($stats as &$stat) {
144 144
                 $stat['id'] = $index++;
145
-                $stat['cnt'] = (int)$stat['cnt'];
146
-                $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad;
145
+                $stat['cnt'] = (int) $stat['cnt'];
146
+                $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad;
147 147
                 // Decode any emojis in the title
148 148
                 if (!empty($stat['title'])) {
149 149
                     $stat['title'] = html_entity_decode($stat['title'], ENT_NOQUOTES, 'UTF-8');
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             ->where(['url' => $pageUrl])
241 241
             ->andWhere(['between', 'dateUpdated', $start, $end])
242 242
         ;
243
-        if ((int)$siteId !== 0) {
243
+        if ((int) $siteId !== 0) {
244 244
             $query->andWhere(['siteId' => $siteId]);
245 245
         }
246 246
         if ($filter !== '') {
@@ -272,12 +272,12 @@  discard block
 block discarded – undo
272 272
                     $stat['type'] = 'frontend';
273 273
                 }
274 274
                 if ($stat['pageLoad'] > $maxTotalPageLoad) {
275
-                    $maxTotalPageLoad = (int)$stat['pageLoad'];
275
+                    $maxTotalPageLoad = (int) $stat['pageLoad'];
276 276
                 }
277 277
             }
278 278
             // Massage the stats
279 279
             foreach ($stats as &$stat) {
280
-                $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad;
280
+                $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad;
281 281
                 // Decode any emojis in the title
282 282
                 if (!empty($stat['title'])) {
283 283
                     $stat['title'] = html_entity_decode($stat['title'], ENT_NOQUOTES, 'UTF-8');
Please login to merge, or discard this patch.
src/services/Beacons.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         $stats = Webperf::$plugin->profileTarget->stats;
143 143
         $request = Craft::$app->getRequest();
144
-        $pageLoad = (int)($stats['database']['duration']
144
+        $pageLoad = (int) ($stats['database']['duration']
145 145
             + $stats['twig']['duration']
146 146
             + $stats['other']['duration']);
147 147
         // Allocate a new DataSample, and fill it in
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
             'queryString' => $request->getQueryString(),
152 152
             'pageLoad' => $pageLoad,
153 153
             'craftTotalMs' => $pageLoad,
154
-            'craftDbMs' => (int)$stats['database']['duration'],
155
-            'craftDbCnt' => (int)$stats['database']['count'],
156
-            'craftTwigMs' => (int)$stats['twig']['duration'],
157
-            'craftTwigCnt' => (int)$stats['twig']['count'],
158
-            'craftOtherMs' => (int)$stats['other']['duration'],
159
-            'craftOtherCnt' => (int)$stats['other']['count'],
160
-            'craftTotalMemory' => (int)($stats['database']['memory']
154
+            'craftDbMs' => (int) $stats['database']['duration'],
155
+            'craftDbCnt' => (int) $stats['database']['count'],
156
+            'craftTwigMs' => (int) $stats['twig']['duration'],
157
+            'craftTwigCnt' => (int) $stats['twig']['count'],
158
+            'craftOtherMs' => (int) $stats['other']['duration'],
159
+            'craftOtherCnt' => (int) $stats['other']['count'],
160
+            'craftTotalMemory' => (int) ($stats['database']['memory']
161 161
                 + $stats['twig']['memory']
162 162
                 + $stats['other']['memory']),
163 163
         ]);
Please login to merge, or discard this patch.