|
8 | 8 | namespace Magento\Framework\Image\Adapter;
|
9 | 9 |
|
10 | 10 | use Magento\Framework\App\Filesystem\DirectoryList;
|
| 11 | +use Magento\Framework\Exception\FileSystemException; |
| 12 | +use Magento\Framework\Filesystem; |
| 13 | +use Magento\Framework\Filesystem\Directory\Write; |
| 14 | +use Psr\Log\LoggerInterface; |
11 | 15 |
|
12 | 16 | /**
|
13 | 17 | * Image abstract adapter
|
14 | 18 | *
|
15 |
| - * @api |
16 | 19 | * @SuppressWarnings(PHPMD.TooManyFields)
|
17 | 20 | */
|
18 | 21 | abstract class AbstractAdapter implements AdapterInterface
|
@@ -150,17 +153,17 @@ abstract class AbstractAdapter implements AdapterInterface
|
150 | 153 | /**
|
151 | 154 | * Filesystem instance
|
152 | 155 | *
|
153 |
| - * @var \Magento\Framework\Filesystem |
| 156 | + * @var Filesystem |
154 | 157 | */
|
155 | 158 | protected $_filesystem;
|
156 | 159 |
|
157 | 160 | /**
|
158 |
| - * @var \Magento\Framework\Filesystem\Directory\Write |
| 161 | + * @var Write |
159 | 162 | */
|
160 | 163 | protected $directoryWrite;
|
161 | 164 |
|
162 | 165 | /**
|
163 |
| - * @var \Psr\Log\LoggerInterface |
| 166 | + * @var LoggerInterface |
164 | 167 | */
|
165 | 168 | protected $logger;
|
166 | 169 |
|
@@ -267,14 +270,14 @@ abstract public function getColorAt($x, $y);
|
267 | 270 | /**
|
268 | 271 | * Initialize default values
|
269 | 272 | *
|
270 |
| - * @param \Magento\Framework\Filesystem $filesystem |
271 |
| - * @param \Psr\Log\LoggerInterface $logger |
272 |
| - * @param array $data |
| 273 | + * @param Filesystem $filesystem |
| 274 | + * @param LoggerInterface $logger |
| 275 | + * @throws FileSystemException |
273 | 276 | * @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
274 | 277 | */
|
275 | 278 | public function __construct(
|
276 |
| - \Magento\Framework\Filesystem $filesystem, |
277 |
| - \Psr\Log\LoggerInterface $logger |
| 279 | + Filesystem $filesystem, |
| 280 | + LoggerInterface $logger |
278 | 281 | ) {
|
279 | 282 | $this->_filesystem = $filesystem;
|
280 | 283 | $this->logger = $logger;
|
@@ -686,7 +689,7 @@ protected function _prepareDestination($destination = null, $newName = null)
|
686 | 689 | if (!is_writable($destination)) {
|
687 | 690 | try {
|
688 | 691 | $this->directoryWrite->create($this->directoryWrite->getRelativePath($destination));
|
689 |
| - } catch (\Magento\Framework\Exception\FileSystemException $e) { |
| 692 | + } catch (FileSystemException $e) { |
690 | 693 | $this->logger->critical($e);
|
691 | 694 | //phpcs:ignore Magento2.Exceptions.DirectThrow
|
692 | 695 | throw new \DomainException(
|
|
0 commit comments