CS: PSR1/2

parent ad5d2e36
...@@ -64,7 +64,6 @@ class MoveFileOnDisk ...@@ -64,7 +64,6 @@ class MoveFileOnDisk
$this->getDestinationPath($toPath) $this->getDestinationPath($toPath)
); );
} catch (FileExistsException $e) { } catch (FileExistsException $e) {
} }
} }
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Modules\Media\Http\Controllers\Api; namespace Modules\Media\Http\Controllers\Api;
use Illuminate\Routing\Controller; use Illuminate\Routing\Controller;
use Modules\Media\Entities\File;
use Modules\Media\Http\Requests\MoveMediaRequest; use Modules\Media\Http\Requests\MoveMediaRequest;
use Modules\Media\Repositories\FileRepository; use Modules\Media\Repositories\FileRepository;
use Modules\Media\Repositories\FolderRepository; use Modules\Media\Repositories\FolderRepository;
...@@ -28,8 +27,7 @@ class MoveMediaController extends Controller ...@@ -28,8 +27,7 @@ class MoveMediaController extends Controller
FileRepository $file, FileRepository $file,
FolderRepository $folder, FolderRepository $folder,
Mover $mover Mover $mover
) ) {
{
$this->file = $file; $this->file = $file;
$this->folder = $folder; $this->folder = $folder;
$this->mover = $mover; $this->mover = $mover;
......
...@@ -14,17 +14,13 @@ use Modules\Media\Console\RefreshThumbnailCommand; ...@@ -14,17 +14,13 @@ use Modules\Media\Console\RefreshThumbnailCommand;
use Modules\Media\Contracts\DeletingMedia; use Modules\Media\Contracts\DeletingMedia;
use Modules\Media\Contracts\StoringMedia; use Modules\Media\Contracts\StoringMedia;
use Modules\Media\Entities\File; use Modules\Media\Entities\File;
use Modules\Media\Events\FileStartedMoving;
use Modules\Media\Events\FolderIsDeleting; use Modules\Media\Events\FolderIsDeleting;
use Modules\Media\Events\FolderStartedMoving;
use Modules\Media\Events\FolderWasCreated; use Modules\Media\Events\FolderWasCreated;
use Modules\Media\Events\FolderWasUpdated; use Modules\Media\Events\FolderWasUpdated;
use Modules\Media\Events\Handlers\CreateFolderOnDisk; use Modules\Media\Events\Handlers\CreateFolderOnDisk;
use Modules\Media\Events\Handlers\DeleteAllChildrenOfFolder; use Modules\Media\Events\Handlers\DeleteAllChildrenOfFolder;
use Modules\Media\Events\Handlers\DeleteFolderOnDisk; use Modules\Media\Events\Handlers\DeleteFolderOnDisk;
use Modules\Media\Events\Handlers\HandleMediaStorage; use Modules\Media\Events\Handlers\HandleMediaStorage;
use Modules\Media\Events\Handlers\MoveFileOnDisk;
use Modules\Media\Events\Handlers\MoveFolderOnDisk;
use Modules\Media\Events\Handlers\RegisterMediaSidebar; use Modules\Media\Events\Handlers\RegisterMediaSidebar;
use Modules\Media\Events\Handlers\RemovePolymorphicLink; use Modules\Media\Events\Handlers\RemovePolymorphicLink;
use Modules\Media\Events\Handlers\RenameFolderOnDisk; use Modules\Media\Events\Handlers\RenameFolderOnDisk;
......
...@@ -90,6 +90,7 @@ final class FileMover implements MoverInterface ...@@ -90,6 +90,7 @@ final class FileMover implements MoverInterface
} catch (FileExistsException $e) { } catch (FileExistsException $e) {
return false; return false;
} }
return true; return true;
} }
......
...@@ -91,6 +91,7 @@ final class FolderMover implements MoverInterface ...@@ -91,6 +91,7 @@ final class FolderMover implements MoverInterface
} catch (FileExistsException $e) { } catch (FileExistsException $e) {
return false; return false;
} }
return true; return true;
} }
......
...@@ -11,7 +11,6 @@ use Modules\Media\Events\FileWasCreated; ...@@ -11,7 +11,6 @@ use Modules\Media\Events\FileWasCreated;
use Modules\Media\Events\FileWasUpdated; use Modules\Media\Events\FileWasUpdated;
use Modules\Media\Repositories\FileRepository; use Modules\Media\Repositories\FileRepository;
use Modules\Media\Repositories\FolderRepository; use Modules\Media\Repositories\FolderRepository;
use Modules\Media\Services\FileService;
use Symfony\Component\Finder\SplFileInfo; use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
......
...@@ -5,8 +5,8 @@ namespace Modules\Media\Tests; ...@@ -5,8 +5,8 @@ namespace Modules\Media\Tests;
use Modules\Media\Entities\File; use Modules\Media\Entities\File;
use Modules\Media\Repositories\FileRepository; use Modules\Media\Repositories\FileRepository;
use Modules\Media\Repositories\FolderRepository; use Modules\Media\Repositories\FolderRepository;
use Modules\Media\Services\Movers\FileMover;
use Modules\Media\Services\FileService; use Modules\Media\Services\FileService;
use Modules\Media\Services\Movers\FileMover;
final class FileMoverTest extends MediaTestCase final class FileMoverTest extends MediaTestCase
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment