mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Core][CS] Minor refactor
This commit is contained in:
parent
b960b052ba
commit
704aeda3bb
6 changed files with 16 additions and 14 deletions
|
|
@ -1,6 +0,0 @@
|
|||
flysystem:
|
||||
storages:
|
||||
sylius.storage:
|
||||
adapter: 'local'
|
||||
options:
|
||||
directory: '%sylius_core.images_dir%'
|
||||
|
|
@ -16,7 +16,7 @@ namespace Sylius\Component\Core\Filesystem\Adapter;
|
|||
use League\Flysystem\FilesystemOperator;
|
||||
use Sylius\Component\Core\Filesystem\Exception\FileNotFoundException;
|
||||
|
||||
class FlysystemFilesystemAdapter implements FilesystemAdapterInterface
|
||||
final class FlysystemFilesystemAdapter implements FilesystemAdapterInterface
|
||||
{
|
||||
public function __construct(private FilesystemOperator $filesystem)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ use Gaufrette\FilesystemInterface;
|
|||
use Sylius\Component\Core\Filesystem\Exception\FileNotFoundException;
|
||||
|
||||
/**
|
||||
* @deprecated since version 1.12, to be removed in 2.0. Use {@link FilesystemInterface} instead.
|
||||
* @deprecated since version 1.12, to be removed in 2.0. Use {@link FlysystemFilesystemAdapter} instead.
|
||||
*/
|
||||
class GaufretteFilesystemAdapter implements FilesystemAdapterInterface
|
||||
final class GaufretteFilesystemAdapter implements FilesystemAdapterInterface
|
||||
{
|
||||
public function __construct(private FilesystemInterface $filesystem)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,13 +13,10 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Component\Core\Filesystem\Exception;
|
||||
|
||||
use Throwable;
|
||||
|
||||
final class FileNotFoundException extends \RuntimeException
|
||||
{
|
||||
public function __construct(string $fileLocation, ?\Exception $previousException = null)
|
||||
{
|
||||
|
||||
parent::__construct(sprintf('File "%s" could not be found.', $fileLocation), 0, $previousException);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Paweł Jędrzejewski
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace spec\Sylius\Component\Core\Filesystem\Adapter;
|
||||
|
||||
use League\Flysystem\FilesystemOperator;
|
||||
|
|
@ -7,7 +18,7 @@ use PhpSpec\ObjectBehavior;
|
|||
use Sylius\Component\Core\Filesystem\Adapter\FilesystemAdapterInterface;
|
||||
use Sylius\Component\Core\Filesystem\Exception\FileNotFoundException;
|
||||
|
||||
class FlysystemFilesystemAdapterSpec extends ObjectBehavior
|
||||
final class FlysystemFilesystemAdapterSpec extends ObjectBehavior
|
||||
{
|
||||
function let(FilesystemOperator $filesystem): void
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ use PhpSpec\ObjectBehavior;
|
|||
use Sylius\Component\Core\Filesystem\Adapter\FilesystemAdapterInterface;
|
||||
use Sylius\Component\Core\Filesystem\Exception\FileNotFoundException;
|
||||
|
||||
class GaufretteFilesystemAdapterSpec extends ObjectBehavior
|
||||
final class GaufretteFilesystemAdapterSpec extends ObjectBehavior
|
||||
{
|
||||
function let(FilesystemInterface $filesystem): void
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue