Test Setup Failed
Branch master (1f9cb7)
by Nicolaas
08:03
created
Category
src/MoveFiles.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $folderName = self::config()->get('folder_name');
36 36
         $oldPath = Controller::join_links(ASSETS_PATH, '..', $folderName);
37 37
         $newPath = Controller::join_links(ASSETS_PATH, $folderName);
38
-        if (! file_exists($newPath)) {
38
+        if (!file_exists($newPath)) {
39 39
             if (file_exists($oldPath)) {
40 40
                 DB::alteration_message('Moved ' . $oldPath . ' to ' . $newPath . '');
41 41
                 rename($oldPath, $newPath);
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
             foreach ($paths as $path) {
57 57
                 $path = Controller::join_links($newFolderPath, $path);
58 58
                 DB::alteration_message('considering ' . $path);
59
-                if (! is_dir($path)) {
59
+                if (!is_dir($path)) {
60 60
                     $fileName = basename($path);
61 61
                     $folderPath = dirname($path);
62 62
                     $folder = Folder::find_or_make($folderPath);
63
-                    $filter = ['Name' => $fileName, 'ParentID' => $folder->ID];
63
+                    $filter = [ 'Name' => $fileName, 'ParentID' => $folder->ID ];
64 64
                     $file = File::get()->filter($filter)->first();
65
-                    if (! $file) {
65
+                    if (!$file) {
66 66
                         DB::alteration_message('New file: ' . $path);
67 67
                         $file = File::create();
68 68
                         $file->setFromLocalFile($path);
Please login to merge, or discard this patch.