diff --git a/Controller/Adminhtml/Eacore.php b/Controller/Adminhtml/Eacore.php index 9a99cf6..782f90e 100644 --- a/Controller/Adminhtml/Eacore.php +++ b/Controller/Adminhtml/Eacore.php @@ -20,17 +20,19 @@ namespace Eadesigndev\Eacore\Controller\Adminhtml; -abstract class Eacore extends \Magento\Backend\App\Action +use Magento\Framework\App\ActionInterface; + +abstract class Eacore extends \Magento\Backend\App\Action implements ActionInterface { - CONST ADMIN_RESOURCE_VIEW = 'Eadesigndev_Eacore::index'; + const ADMIN_RESOURCE_VIEW = 'Eadesigndev_Eacore::index'; /** * Core registry * * @var \Magento\Framework\Registry */ - protected $coreRegistry; + private $coreRegistry; /** * @param \Magento\Backend\App\Action\Context $context @@ -68,5 +70,4 @@ protected function _isAllowed() { return $this->_authorization->isAllowed(self::ADMIN_RESOURCE_VIEW); } - -} \ No newline at end of file +} diff --git a/Controller/Adminhtml/Index/Index.php b/Controller/Adminhtml/Index/Index.php index e90c420..a3e4fbf 100644 --- a/Controller/Adminhtml/Index/Index.php +++ b/Controller/Adminhtml/Index/Index.php @@ -20,10 +20,10 @@ namespace Eadesigndev\Eacore\Controller\Adminhtml\Index; -class Index extends \Eadesigndev\Eacore\Controller\Adminhtml\Eacore -{ - +use Magento\Framework\App\ActionInterface; +class Index extends \Eadesigndev\Eacore\Controller\Adminhtml\Eacore implements ActionInterface +{ private $helper; /** @@ -32,7 +32,9 @@ class Index extends \Eadesigndev\Eacore\Controller\Adminhtml\Eacore protected $resultPageFactory; /** + * Index constructor. * @param \Magento\Backend\App\Action\Context $context + * @param \Eadesigndev\Eacore\Helper\Data $helper * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory */ @@ -41,8 +43,7 @@ public function __construct( \Eadesigndev\Eacore\Helper\Data $helper, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\View\Result\PageFactory $resultPageFactory - ) - { + ) { $this->helper = $helper; $this->resultPageFactory = $resultPageFactory; parent::__construct($context, $coreRegistry); @@ -63,5 +64,4 @@ public function execute() $this->initPage($resultPage)->getConfig()->getTitle()->prepend(__(' ')); return $resultPage; } - -} \ No newline at end of file +} diff --git a/Helper/Data.php b/Helper/Data.php index 1be4c73..7456d6b 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -46,6 +46,9 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper /** * Data constructor. * @param \Magento\Framework\App\Helper\Context $context + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Module\ResourceInterface $moduleResource + * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\HTTP\Client\Curl $curl */ public function __construct( @@ -54,8 +57,7 @@ public function __construct( \Magento\Framework\Module\ResourceInterface $moduleResource, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\HTTP\Client\Curl $curl - ) - { + ) { $this->_moduleList = $moduleList; $this->moduleResource = $moduleResource; $this->storeManager = $storeManager; diff --git a/composer.json b/composer.json index f425587..e3065c2 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "eadesignro/module-eacore", "description": "The module with the menu and other features needed by other modules developed by EaDesign", "type": "magento2-module", - "version": "0.2.9", + "version": "0.2.10", "autoload": { "files": [ "registration.php" @@ -22,11 +22,18 @@ } ], "require": { - "php": "~7.0.13|~7.1.0", - "magento/module-backend": "^100.1.0| ^100.2.0" + "php": "~7.0.13 | ~7.1.3 | ~7.2.0", + "magento/module-backend": "^100.1.0 | ^100.2.0 | ^101.0.0" }, "require-dev": { - "phpunit/phpunit": "~6.2.0" + "friendsofphp/php-cs-fixer": "~2.13.0", + "lusitanian/oauth": "~0.8.10", + "magento/magento2-functional-testing-framework": "2.3.9", + "pdepend/pdepend": "2.5.2", + "phpmd/phpmd": "@stable", + "phpunit/phpunit": "~6.5.0", + "sebastian/phpcpd": "~3.0.0", + "squizlabs/php_codesniffer": "3.3.1" }, "minimum-stability": "dev", "prefer-stable": true diff --git a/etc/module.xml b/etc/module.xml index f7104b8..a238fec 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -19,5 +19,5 @@ */ --> - + diff --git a/registration.php b/registration.php index 32ab68b..100946d 100644 --- a/registration.php +++ b/registration.php @@ -17,7 +17,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -use \Magento\Framework\Component\ComponentRegistrar; +use Magento\Framework\Component\ComponentRegistrar; ComponentRegistrar::register( ComponentRegistrar::MODULE,