diff --git a/Block/PictureFactory.php b/Block/PictureFactory.php index ebf664e..5d5f35a 100644 --- a/Block/PictureFactory.php +++ b/Block/PictureFactory.php @@ -34,7 +34,7 @@ public function __construct( * @param Image $originalImage * @param Image[] $images * @param string $htmlTag - * @param bool $isDataSrc + * @param string $srcAttribute * @return Picture */ public function create( diff --git a/Image/ImageFactory.php b/Image/ImageFactory.php index 0c28e2c..ca920ea 100644 --- a/Image/ImageFactory.php +++ b/Image/ImageFactory.php @@ -2,21 +2,16 @@ namespace Yireo\NextGenImages\Image; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\ObjectManagerInterface; -use Magento\Framework\View\Asset\File\NotFoundException; use Yireo\NextGenImages\Util\UrlConvertor; class ImageFactory { - /** - * @var ObjectManagerInterface - */ - private $objectManager; + private ObjectManagerInterface $objectManager; - /** - * @var UrlConvertor - */ - private $urlConvertor; + private UrlConvertor $urlConvertor; /** * @param ObjectManagerInterface $objectManager @@ -33,7 +28,7 @@ public function __construct( /** * @param string $path * @return Image - * @throws NotFoundException + * @throws NoSuchEntityException */ public function createFromPath(string $path): Image { @@ -44,7 +39,7 @@ public function createFromPath(string $path): Image /** * @param string $url * @return Image - * @throws NotFoundException + * @throws FileSystemException */ public function createFromUrl(string $url): Image {