@@ -107,7 +107,7 @@ |
||
107 | 107 | if (!empty($pageUrl)) { |
108 | 108 | $query->andWhere(['url' => $pageUrl]); |
109 | 109 | } |
110 | - if ((int)$siteId !== 0) { |
|
110 | + if ((int) $siteId !== 0) { |
|
111 | 111 | $query->andWhere(['siteId' => $siteId]); |
112 | 112 | } |
113 | 113 | $stats = $query->all(); |
@@ -36,7 +36,7 @@ |
||
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', |
@@ -36,7 +36,7 @@ |
||
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', |
@@ -36,7 +36,7 @@ |
||
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', |
@@ -36,7 +36,7 @@ |
||
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', |
@@ -36,7 +36,7 @@ |
||
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', |
@@ -36,7 +36,7 @@ |
||
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', |
@@ -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', |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | ]) |
82 | 82 | ->where(['between', 'dateCreated', $start, $end]) |
83 | 83 | ->andWhere(['not', [$column => null]]); |
84 | - if ((int)$siteId !== 0) { |
|
84 | + if ((int) $siteId !== 0) { |
|
85 | 85 | $query->andWhere(['siteId' => $siteId]); |
86 | 86 | } |
87 | 87 | if ($pageUrl !== '') { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | // Massage the data |
92 | 92 | if ($stats) { |
93 | 93 | foreach ($stats as &$stat) { |
94 | - $stat['cnt'] = (int)$stat['cnt']; |
|
94 | + $stat['cnt'] = (int) $stat['cnt']; |
|
95 | 95 | } |
96 | 96 | $data = $stats[0]; |
97 | 97 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ]) |
137 | 137 | ->where(['between', 'dateCreated', $start, $end]) |
138 | 138 | ->andWhere(['not', [$column => null]]); |
139 | - if ((int)$siteId !== 0) { |
|
139 | + if ((int) $siteId !== 0) { |
|
140 | 140 | $query->andWhere(['siteId' => $siteId]); |
141 | 141 | } |
142 | 142 | $query |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | // Massage the data |
148 | 148 | if ($stats) { |
149 | 149 | foreach ($stats as &$stat) { |
150 | - $stat['cnt'] = (int)$stat['cnt']; |
|
150 | + $stat['cnt'] = (int) $stat['cnt']; |
|
151 | 151 | $stat['detailPageUrl'] = UrlHelper::cpUrl('webperf/page-detail', [ |
152 | 152 | 'pageUrl' => $stat['url'], |
153 | 153 | 'siteId' => $siteId, |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | ]) |
219 | 219 | ->where(['between', 'dateCreated', $start, $end]) |
220 | 220 | ; |
221 | - if ((int)$siteId !== 0) { |
|
221 | + if ((int) $siteId !== 0) { |
|
222 | 222 | $query->andWhere(['siteId' => $siteId]); |
223 | 223 | } |
224 | 224 | if ($pageUrl !== '') { |