Passed
Push — develop ( a752da...61f94b )
by Andrew
06:59
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
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
         while ($currentElement < $totalElements) {
92 92
             $elements = $paginator->getPageResults();
93 93
             if (Craft::$app instanceof ConsoleApplication) {
94
-                echo 'Query ' . $paginator->getCurrentPage() . '/' . $paginator->getTotalPages()
95
-                    . ' - assets: ' . $paginator->getTotalResults()
94
+                echo 'Query '.$paginator->getCurrentPage().'/'.$paginator->getTotalPages()
95
+                    . ' - assets: '.$paginator->getTotalResults()
96 96
                     . PHP_EOL;
97 97
             }
98 98
             /** @var ElementInterface $element */
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
                         if ($field instanceof OptimizedImagesField && $element instanceof Asset) {
108 108
                             if ($this->fieldId === null || $field->id == $this->fieldId) {
109 109
                                 if (Craft::$app instanceof ConsoleApplication) {
110
-                                    echo $currentElement . '/' . $totalElements
111
-                                        . ' - processing asset: ' . $element->title
112
-                                        . ' from field: ' . $field->name . PHP_EOL;
110
+                                    echo $currentElement.'/'.$totalElements
111
+                                        . ' - processing asset: '.$element->title
112
+                                        . ' from field: '.$field->name.PHP_EOL;
113 113
                                 }
114 114
                                 try {
115 115
                                     ImageOptimize::$plugin->optimizedImages->updateOptimizedImageFieldData($field, $element, $this->force);
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
                                         echo '[error]: '
120 120
                                             . $e->getMessage()
121 121
                                             . ' while processing '
122
-                                            . $currentElement . '/' . $totalElements
123
-                                            . ' - processing asset: ' . $element->title
124
-                                            . ' from field: ' . $field->name . PHP_EOL;
122
+                                            . $currentElement.'/'.$totalElements
123
+                                            . ' - processing asset: '.$element->title
124
+                                            . ' from field: '.$field->name.PHP_EOL;
125 125
                                     }
126 126
                                 }
127 127
                             }
Please login to merge, or discard this patch.