Passed
Push — develop ( 869a4a...a752da )
by Andrew
05:07
created
src/services/Placeholder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         );
89 89
         $result = '';
90 90
         $width = self::PLACEHOLDER_WIDTH;
91
-        $height = (int)($width / $aspectRatio);
91
+        $height = (int) ($width / $aspectRatio);
92 92
         $placeholderPath = $this->createImageFromPath($tempPath, $width, $height, self::PLACEHOLDER_QUALITY, $position);
93 93
         if (!empty($placeholderPath)) {
94 94
             $result = base64_encode(file_get_contents($placeholderPath));
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         Craft::beginProfile('generateColorPalette', __METHOD__);
112 112
         Craft::info(
113
-            'Generating color palette for: ' . $tempPath,
113
+            'Generating color palette for: '.$tempPath,
114 114
             __METHOD__
115 115
         );
116 116
         $colorPalette = [];
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $lightness /= $colorCount;
157 157
         }
158 158
 
159
-        return $lightness === null ? $lightness : (int)$lightness;
159
+        return $lightness === null ? $lightness : (int) $lightness;
160 160
     }
161 161
     /**
162 162
      * Generate an SVG image via Potrace
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             __METHOD__
220 220
         );
221 221
         $width = self::TEMP_PLACEHOLDER_WIDTH;
222
-        $height = (int)($width / $aspectRatio);
222
+        $height = (int) ($width / $aspectRatio);
223 223
         $tempPath = $this->createImageFromAsset($asset, $width, $height, self::TEMP_PLACEHOLDER_QUALITY, $position);
224 224
         Craft::endProfile('createTempPlaceholderImage', __METHOD__);
225 225
 
Please login to merge, or discard this patch.
src/jobs/ResaveOptimizedImages.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
             $elements = $provider->getModels();
98 98
             if (Craft::$app instanceof ConsoleApplication) {
99 99
                 $pageNum = $provider->getPagination()->getPage() + 1;
100
-                echo 'Query ' . $pageNum . '/' . $provider->getPagination()->getPageCount()
101
-                    . ' - assets: ' . $provider->count
100
+                echo 'Query '.$pageNum.'/'.$provider->getPagination()->getPageCount()
101
+                    . ' - assets: '.$provider->count
102 102
                     . PHP_EOL;
103 103
             }
104 104
             /** @var ElementInterface $element */
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
                         if ($field instanceof OptimizedImagesField && $element instanceof Asset) {
114 114
                             if ($this->fieldId === null || $field->id == $this->fieldId) {
115 115
                                 if (Craft::$app instanceof ConsoleApplication) {
116
-                                    echo $currentElement . '/' . $totalElements
117
-                                        . ' - processing asset: ' . $element->title
118
-                                        . ' from field: ' . $field->name . PHP_EOL;
116
+                                    echo $currentElement.'/'.$totalElements
117
+                                        . ' - processing asset: '.$element->title
118
+                                        . ' from field: '.$field->name.PHP_EOL;
119 119
                                 }
120 120
                                 try {
121 121
                                     ImageOptimize::$plugin->optimizedImages->updateOptimizedImageFieldData($field, $element, $this->force);
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
                                         echo '[error]: '
126 126
                                             . $e->getMessage()
127 127
                                             . ' while processing '
128
-                                            . $currentElement . '/' . $totalElements
129
-                                            . ' - processing asset: ' . $element->title
130
-                                            . ' from field: ' . $field->name . PHP_EOL;
128
+                                            . $currentElement.'/'.$totalElements
129
+                                            . ' - processing asset: '.$element->title
130
+                                            . ' from field: '.$field->name.PHP_EOL;
131 131
                                     }
132 132
                                 }
133 133
                             }
Please login to merge, or discard this patch.