@@ -82,7 +82,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 !== '') { |
@@ -124,7 +124,7 @@ discard block |
||
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 |
||
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(); |
@@ -38,10 +38,10 @@ |
||
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', |