Test Failed
Pull Request — develop (#286)
by
unknown
06:44
created
src/controllers/FileController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $variables['docsUrl'] = self::DOCUMENTATION_URL;
198 198
         $variables['pluginName'] = $pluginName;
199 199
         $variables['title'] = $templateTitle;
200
-        $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : '';
200
+        $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : '';
201 201
         $variables['crumbs'] = [
202 202
             [
203 203
                 'label' => $pluginName,
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             ],
206 206
             [
207 207
                 'label' => 'Redirects',
208
-                'url' => UrlHelper::cpUrl('retour/redirects' . $siteHandleUri),
208
+                'url' => UrlHelper::cpUrl('retour/redirects'.$siteHandleUri),
209 209
             ],
210 210
         ];
211 211
         $variables['docTitle'] = "{$pluginName} - Redirects - {$templateTitle}";
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $file = UploadedFile::getInstanceByName('file');
216 216
         if ($file !== null) {
217 217
             $filename = uniqid($file->name, true);
218
-            $filePath = Craft::$app->getPath()->getTempPath() . DIRECTORY_SEPARATOR . $filename;
218
+            $filePath = Craft::$app->getPath()->getTempPath().DIRECTORY_SEPARATOR.$filename;
219 219
             $file->saveAs($filePath, false);
220 220
             // Also save the file to the cache as a backup way to access it
221 221
             $fileContents = @file_get_contents($filePath);
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
         }
349 349
         $csv->insertOne(array_values($columns));
350 350
         $csv->insertAll($data);
351
-        $csv->output($filename . '.csv');
351
+        $csv->output($filename.'.csv');
352 352
         exit(0);
353 353
     }
354 354
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $csv->setOffset(1);
365 365
         $columns = ArrayHelper::filterEmptyStringsFromArray($columns);
366 366
         $rowIndex = 1;
367
-        $csv->each(function ($row) use ($headers, $columns, &$rowIndex, &$hasErrors) {
367
+        $csv->each(function($row) use ($headers, $columns, &$rowIndex, &$hasErrors) {
368 368
             $redirectConfig = [
369 369
                 'id' => 0,
370 370
             ];
@@ -378,9 +378,9 @@  discard block
 block discarded – undo
378 378
                 $index++;
379 379
             }
380 380
             $redirectDump = print_r($redirectConfig, true);
381
-            Craft::debug("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__);
381
+            Craft::debug("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__);
382 382
             if (!Retour::$plugin->redirects->saveRedirect($redirectConfig)) {
383
-                Craft::info("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__);
383
+                Craft::info("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__);
384 384
                 $hasErrors = true;
385 385
             }
386 386
             $rowIndex++;
@@ -420,9 +420,9 @@  discard block
 block discarded – undo
420 420
                 $index++;
421 421
             }
422 422
             $redirectDump = print_r($redirectConfig, true);
423
-            Craft::debug("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__);
423
+            Craft::debug("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__);
424 424
             if (!Retour::$plugin->redirects->saveRedirect($redirectConfig)) {
425
-                Craft::info("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__);
425
+                Craft::info("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__);
426 426
                 $hasErrors = true;
427 427
             }
428 428
             $rowIndex++;
Please login to merge, or discard this patch.