diff --git a/composer.json b/composer.json index 4cb863a..1510c57 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } }, "require": { - "magento/framework": "^101.0.0", + "magento/framework": "101 - 102", "psr/log": "~1.0" }, "authors": [ diff --git a/src/Helper/Data.php b/src/Helper/Data.php index 1eb8181..edf3000 100644 --- a/src/Helper/Data.php +++ b/src/Helper/Data.php @@ -6,17 +6,16 @@ class Data extends AbstractHelper { - protected $_assetSource; - protected $_assetRepository; + protected $assetSource; + protected $assetRepository; public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Framework\View\Asset\Source $assetSource, \Magento\Framework\View\Asset\Repository $assetRepository - ) - { - $this->_assetSource = $assetSource; - $this->_assetRepository = $assetRepository; + ) { + $this->assetSource = $assetSource; + $this->assetRepository = $assetRepository; parent::__construct($context); } @@ -28,8 +27,7 @@ public function __construct( */ public function getViewSvg($path) { - $file = $this->_assetRepository->createAsset($path); - return $this->_assetSource->getContent($file); + $file = $this->assetRepository->createAsset($path); + return $this->assetSource->getContent($file); } - } diff --git a/src/Plugin/BlockPlugin.php b/src/Plugin/BlockPlugin.php index 6a18f34..8f13f5a 100644 --- a/src/Plugin/BlockPlugin.php +++ b/src/Plugin/BlockPlugin.php @@ -4,17 +4,16 @@ class BlockPlugin { - protected $_svgHelper; + protected $svgHelper; public function __construct( \Meanbee\SVGHelper\Helper\Data $svgHelper - ) - { - $this->_svgHelper = $svgHelper; + ) { + $this->svgHelper = $svgHelper; } public function afterCreateBlock($subject, $result) { - return $result->setData('svgHelper', $this->_svgHelper); + return $result->setData('svgHelper', $this->svgHelper); } } diff --git a/src/etc/frontend/di.xml b/src/etc/frontend/di.xml index 57661a1..0ddced2 100644 --- a/src/etc/frontend/di.xml +++ b/src/etc/frontend/di.xml @@ -1,3 +1,5 @@ + + diff --git a/src/registration.php b/src/registration.php index 7a58064..12d1dd1 100644 --- a/src/registration.php +++ b/src/registration.php @@ -4,4 +4,4 @@ \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Meanbee_SVGHelper', __DIR__ -); \ No newline at end of file +);