Skip to content

Commit

Permalink
Merge pull request #8 from EaDesgin/feature/code-clean-23
Browse files Browse the repository at this point in the history
Feature/code clean 23
  • Loading branch information
eadesignro authored Dec 4, 2018
2 parents b17a427 + 96717c1 commit 761a1c6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
11 changes: 6 additions & 5 deletions Controller/Adminhtml/Eacore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -68,5 +70,4 @@ protected function _isAllowed()
{
return $this->_authorization->isAllowed(self::ADMIN_RESOURCE_VIEW);
}

}
}
14 changes: 7 additions & 7 deletions Controller/Adminhtml/Index/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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
*/
Expand All @@ -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);
Expand All @@ -63,5 +64,4 @@ public function execute()
$this->initPage($resultPage)->getConfig()->getTitle()->prepend(__(' '));
return $resultPage;
}

}
}
6 changes: 4 additions & 2 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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;
Expand Down
15 changes: 11 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Eadesigndev_Eacore" setup_version="0.2.9"/>
<module name="Eadesigndev_Eacore" setup_version="0.2.10"/>
</config>
2 changes: 1 addition & 1 deletion registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 761a1c6

Please sign in to comment.