Passed
Push — develop ( a04106...8c5ef0 )
by Andrew
03:21
created
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.
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', 'dateUpdated', $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', 'dateUpdated', $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', 'dateUpdated', $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', 'dateUpdated', $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,
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 ])
241 241
                 ->where(['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 ($pageUrl !== '') {
Please login to merge, or discard this patch.