Passed
Push — v5 ( 764542...67d3fd )
by Andrew
35:43 queued 25:58
created
src/models/BaseImageTag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@
 block discarded – undo
31 31
     {
32 32
         // Set the class and loading attributes
33 33
         if (isset($attrs['class'])) {
34
-            $attrs['class'] = trim($attrs['class'] . ' lazyload');
34
+            $attrs['class'] = trim($attrs['class'].' lazyload');
35 35
         }
36 36
         // Set the style on this element to be the placeholder image as the background-image
37 37
         if (isset($attrs['style']) && !empty($attrs['src'])) {
38 38
             if (empty($attrs['style'])) {
39 39
                 $attrs['style'] = [];
40 40
             }
41
-            $attrs['style']['background-image'] = 'url(' . $this->getLazyLoadSrc($placeHolder) . ')';
41
+            $attrs['style']['background-image'] = 'url('.$this->getLazyLoadSrc($placeHolder).')';
42 42
             $attrs['style']['background-size'] = 'cover';
43 43
         }
44 44
         // Handle attributes that lazy  and lazySizesFallback have in common
Please login to merge, or discard this patch.
src/imagetransforms/ImageTransform.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     /**
65 65
      * @inheritdoc
66 66
      */
67
-    public function getTransformUrl(Asset $asset, CraftImageTransformModel|string|array|null $transform): ?string
67
+    public function getTransformUrl(Asset $asset, CraftImageTransformModel | string | array | null $transform): ?string
68 68
     {
69 69
         return null;
70 70
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     /**
73 73
      * @inheritdoc
74 74
      */
75
-    public function getWebPUrl(string $url, Asset $asset, CraftImageTransformModel|string|array|null $transform): ?string
75
+    public function getWebPUrl(string $url, Asset $asset, CraftImageTransformModel | string | array | null $transform): ?string
76 76
     {
77 77
         return $url;
78 78
     }
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
     public function getAssetUri(Asset $asset): ?string
100 100
     {
101 101
         $volume = $asset->getVolume();
102
-        $assetPath = $volume->getSubpath() . $asset->getPath();
102
+        $assetPath = $volume->getSubpath().$asset->getPath();
103 103
 
104 104
         // Account for volume types with a subfolder setting
105 105
         // e.g. craftcms/aws-s3, craftcms/google-cloud
106 106
         if ($volume->getFs()->subfolder ?? null) {
107 107
             $subfolder = $volume->getFs()->subfolder;
108 108
             $subfolder = Craft::parseEnv($subfolder);
109
-            return rtrim($subfolder, '/') . '/' . $assetPath;
109
+            return rtrim($subfolder, '/').'/'.$assetPath;
110 110
         }
111 111
 
112 112
         return $assetPath;
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
     {
144 144
         $path = $this->decomposeUrl($pathOrUrl);
145 145
         $path_parts = pathinfo($path['path']);
146
-        $new_path = ($path_parts['filename']) . '.' . ($path_parts['extension'] ?? '') . $extension;
146
+        $new_path = ($path_parts['filename']).'.'.($path_parts['extension'] ?? '').$extension;
147 147
         if (!empty($path_parts['dirname']) && $path_parts['dirname'] !== '.') {
148 148
             $dirname = $path_parts['dirname'];
149 149
             $dirname = $dirname === '/' ? '' : $dirname;
150
-            $new_path = $dirname . DIRECTORY_SEPARATOR . $new_path;
150
+            $new_path = $dirname.DIRECTORY_SEPARATOR.$new_path;
151 151
             $new_path = preg_replace('/([^:])(\/{2,})/', '$1/', $new_path);
152 152
         }
153 153
 
154
-        return $path['prefix'] . $new_path . $path['suffix'];
154
+        return $path['prefix'].$new_path.$path['suffix'];
155 155
     }
156 156
 
157 157
     // Protected Methods
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
 
171 171
         if (filter_var($pathOrUrl, FILTER_VALIDATE_URL)) {
172 172
             $url_parts = parse_url($pathOrUrl);
173
-            $result['prefix'] = $url_parts['scheme'] . '://' . $url_parts['host'];
173
+            $result['prefix'] = $url_parts['scheme'].'://'.$url_parts['host'];
174 174
             if (!empty($url_parts['port'])) {
175
-                $result['prefix'] .= ':' . $url_parts['port'];
175
+                $result['prefix'] .= ':'.$url_parts['port'];
176 176
             }
177 177
             $result['path'] = $url_parts['path'];
178 178
             $result['suffix'] = '';
179
-            $result['suffix'] .= empty($url_parts['query']) ? '' : '?' . $url_parts['query'];
180
-            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#' . $url_parts['fragment'];
179
+            $result['suffix'] .= empty($url_parts['query']) ? '' : '?'.$url_parts['query'];
180
+            $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#'.$url_parts['fragment'];
181 181
         } else {
182 182
             $result['prefix'] = '';
183 183
             $result['path'] = $pathOrUrl;
Please login to merge, or discard this patch.