@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $variables['docsUrl'] = self::DOCUMENTATION_URL; |
204 | 204 | $variables['pluginName'] = $pluginName; |
205 | 205 | $variables['title'] = $templateTitle; |
206 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
206 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
207 | 207 | $variables['crumbs'] = [ |
208 | 208 | [ |
209 | 209 | 'label' => $pluginName, |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | ], |
212 | 212 | [ |
213 | 213 | 'label' => 'Redirects', |
214 | - 'url' => UrlHelper::cpUrl('retour/redirects' . $siteHandleUri), |
|
214 | + 'url' => UrlHelper::cpUrl('retour/redirects'.$siteHandleUri), |
|
215 | 215 | ], |
216 | 216 | ]; |
217 | 217 | $variables['docTitle'] = "{$pluginName} - Redirects - {$templateTitle}"; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $file = UploadedFile::getInstanceByName('file'); |
222 | 222 | if ($file !== null) { |
223 | 223 | $filename = uniqid($file->name, true); |
224 | - $filePath = Craft::$app->getPath()->getTempPath() . DIRECTORY_SEPARATOR . $filename; |
|
224 | + $filePath = Craft::$app->getPath()->getTempPath().DIRECTORY_SEPARATOR.$filename; |
|
225 | 225 | $file->saveAs($filePath, false); |
226 | 226 | // Also save the file to the cache as a backup way to access it |
227 | 227 | $fileContents = @file_get_contents($filePath); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | } |
355 | 355 | $csv->insertOne(array_values($columns)); |
356 | 356 | $csv->insertAll($data); |
357 | - $csv->output($filename . '.csv'); |
|
357 | + $csv->output($filename.'.csv'); |
|
358 | 358 | exit(0); |
359 | 359 | } |
360 | 360 | |
@@ -386,9 +386,9 @@ discard block |
||
386 | 386 | $index++; |
387 | 387 | } |
388 | 388 | $redirectDump = print_r($redirectConfig, true); |
389 | - Craft::debug("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
389 | + Craft::debug("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
390 | 390 | if (!Retour::$plugin->redirects->saveRedirect($redirectConfig)) { |
391 | - Craft::info("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
391 | + Craft::info("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
392 | 392 | $hasErrors = true; |
393 | 393 | } |
394 | 394 | $rowIndex++; |
@@ -428,9 +428,9 @@ discard block |
||
428 | 428 | $index++; |
429 | 429 | } |
430 | 430 | $redirectDump = print_r($redirectConfig, true); |
431 | - Craft::debug("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
431 | + Craft::debug("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
432 | 432 | if (!Retour::$plugin->redirects->saveRedirect($redirectConfig)) { |
433 | - Craft::info("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
433 | + Craft::info("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
434 | 434 | $hasErrors = true; |
435 | 435 | } |
436 | 436 | $rowIndex++; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | - return rtrim($url, '/') . '/' . ltrim(substr($path, $overlap), '/'); |
|
68 | + return rtrim($url, '/').'/'.ltrim(substr($path, $overlap), '/'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
86 | 86 | $url = preg_replace('/{.*}/', '', $url); |
87 | 87 | // Remove any linebreaks that may be errantly in the URL |
88 | - $url = (string)str_replace([ |
|
88 | + $url = (string) str_replace([ |
|
89 | 89 | PHP_EOL, |
90 | 90 | "\r", |
91 | 91 | "\n", |