Passed
Push — develop ( 3980d8...18eea7 )
by Andrew
04:36
created
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.
src/recommendations/MemoryLimit.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@
 block discarded – undo
38 38
         $phpMemoryLimit = $this->memoryLimit();
39 39
         if ($phpMemoryLimit && $this->sample->craftTotalMemory) {
40 40
             $ratio = $phpMemoryLimit / $this->sample->craftTotalMemory;
41
-            $displayCraftTotalMemory = (($this->sample->craftTotalMemory / 1024) / 1024) . 'M';
42
-            $displayPhpMemoryLimit = (($phpMemoryLimit / 1024) / 1024) . 'M';
43
-            $displayCraftMinMemory = ((self::MIN_CRAFT_MEMORY / 1024) / 1024) . 'M';
44
-            $displayCraftMaxMemory = ((self::MAX_CRAFT_MEMORY / 1024) / 1024) . 'M';
41
+            $displayCraftTotalMemory = (($this->sample->craftTotalMemory / 1024) / 1024).'M';
42
+            $displayPhpMemoryLimit = (($phpMemoryLimit / 1024) / 1024).'M';
43
+            $displayCraftMinMemory = ((self::MIN_CRAFT_MEMORY / 1024) / 1024).'M';
44
+            $displayCraftMaxMemory = ((self::MAX_CRAFT_MEMORY / 1024) / 1024).'M';
45 45
             $this->summary = Craft::t(
46 46
                 'webperf',
47 47
                 'Check the `memory_limit` setting in your `php.ini` file',
Please login to merge, or discard this patch.