diff --git a/Helper/ProductGalleryHelper.php b/Helper/ProductGalleryHelper.php index 09381ce..9e9c309 100644 --- a/Helper/ProductGalleryHelper.php +++ b/Helper/ProductGalleryHelper.php @@ -3,7 +3,6 @@ namespace Cloudinary\Cloudinary\Helper; use Cloudinary\Cloudinary\Core\ConfigurationInterface; -use Cloudinary\Cloudinary\Model\Configuration; use Magento\Framework\App\Helper\Context; class ProductGalleryHelper extends \Magento\Framework\App\Helper\AbstractHelper @@ -20,7 +19,7 @@ class ProductGalleryHelper extends \Magento\Framework\App\Helper\AbstractHelper */ protected $cloudinaryPGoptions; - const CASTING = [ + protected $_casting = [ 'themeProps_primary' => 'string', 'themeProps_onPrimary' => 'string', 'themeProps_active' => 'string', @@ -69,8 +68,8 @@ public function getCloudinaryPGOptions($refresh = false, $ignoreDisabled = false $this->cloudinaryPGoptions = $this->configuration->getProductGalleryAll(); foreach ($this->cloudinaryPGoptions as $key => $value) { //Change casting - if (isset(self::CASTING[$key])) { - \settype($value, self::CASTING[$key]); + if (isset($this->_casting[$key])) { + \settype($value, $this->_casting[$key]); $this->cloudinaryPGoptions[$key] = $value; } //Build options hierarchy diff --git a/Model/Observer/ProductGalleryChangeTemplate.php b/Model/Observer/ProductGalleryChangeTemplate.php index 3477195..c324552 100644 --- a/Model/Observer/ProductGalleryChangeTemplate.php +++ b/Model/Observer/ProductGalleryChangeTemplate.php @@ -6,7 +6,7 @@ namespace Cloudinary\Cloudinary\Model\Observer; -use Cloudinary\Cloudinary\Model\Configuration; +use Cloudinary\Cloudinary\Core\ConfigurationInterface; use Magento\Framework\Event\Observer; use Magento\Framework\Event\ObserverInterface; @@ -14,15 +14,15 @@ class ProductGalleryChangeTemplate implements ObserverInterface { /** - * @var Configuration + * @var ConfigurationInterface */ protected $configuration; /** - * @param Configuration $configuration + * @param ConfigurationInterface $configuration */ public function __construct( - Configuration $configuration + ConfigurationInterface $configuration ) { $this->configuration = $configuration; }