Passed
Push — develop ( 8ffe0f...cc57ca )
by Andrew
03:26
created
src/log/ProfileTarget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,8 +92,8 @@
 block discarded – undo
92 92
                 }
93 93
             }
94 94
             $this->stats[$cat]['count']++;
95
-            $this->stats[$cat]['duration'] += (float)$timing['duration'] * 1000;
96
-            $this->stats[$cat]['memory'] += (int)$timing['memoryDiff'];
95
+            $this->stats[$cat]['duration'] += (float) $timing['duration'] * 1000;
96
+            $this->stats[$cat]['memory'] += (int) $timing['memoryDiff'];
97 97
         }
98 98
         $this->stats['memory'] = memory_get_peak_usage(true);
99 99
         if ($final) {
Please login to merge, or discard this patch.
src/services/Recommendations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/recommendations/CraftTotalTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/recommendations/CraftTwigTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/recommendations/CraftQueryTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/recommendations/DomInteractive.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/recommendations/FirstByte.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/recommendations/FirstContentfulPaint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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',
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.