@@ -143,12 +143,12 @@ discard block |
||
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 | - $new_path = $path_parts['dirname'] . DIRECTORY_SEPARATOR . $new_path; |
|
148 | + $new_path = $path_parts['dirname'].DIRECTORY_SEPARATOR.$new_path; |
|
149 | 149 | $new_path = preg_replace('/([^:])(\/{2,})/', '$1/', $new_path); |
150 | 150 | } |
151 | - $output = $path['prefix'] . $new_path . $path['suffix']; |
|
151 | + $output = $path['prefix'].$new_path.$path['suffix']; |
|
152 | 152 | |
153 | 153 | return $output; |
154 | 154 | } |
@@ -169,11 +169,11 @@ discard block |
||
169 | 169 | |
170 | 170 | if (filter_var($pathOrUrl, FILTER_VALIDATE_URL)) { |
171 | 171 | $url_parts = parse_url($pathOrUrl); |
172 | - $result['prefix'] = $url_parts['scheme'] . '://' . $url_parts['host']; |
|
172 | + $result['prefix'] = $url_parts['scheme'].'://'.$url_parts['host']; |
|
173 | 173 | $result['path'] = $url_parts['path']; |
174 | 174 | $result['suffix'] = ''; |
175 | - $result['suffix'] .= empty($url_parts['query']) ? '' : '?' . $url_parts['query']; |
|
176 | - $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#' . $url_parts['fragment']; |
|
175 | + $result['suffix'] .= empty($url_parts['query']) ? '' : '?'.$url_parts['query']; |
|
176 | + $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#'.$url_parts['fragment']; |
|
177 | 177 | } else { |
178 | 178 | $result['prefix'] = ''; |
179 | 179 | $result['path'] = $pathOrUrl; |