diff --git a/Helper/Data.php b/Helper/Data.php index a1def4b..3134471 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -10,27 +10,27 @@ use Magento\Framework\App\Helper\AbstractHelper; /** - * Faonni ShippingTweaks Data helper + * Shipping Tweaks Helper */ class Data extends AbstractHelper { /** - * Enabled config path + * Enabled Config Path */ - const XML_TWEAKS_ENABLED = 'shipping/behavior/tweaks'; + const XML_CONFIG_ENABLED = 'shipping/behavior/tweaks'; /** - * Check Tweaks mode functionality should be enabled + * Check Tweaks mode Functionality Should be Enabled * * @return bool */ public function isEnabled() { - return $this->_getConfig(self::XML_TWEAKS_ENABLED); + return $this->_getConfig(self::XML_CONFIG_ENABLED); } /** - * Retrieve store configuration data + * Retrieve Store Configuration Data * * @param string $path * @return string|null diff --git a/Model/Plugin/Rate/Result.php b/Plugin/Shipping/Model/Rate/Result.php similarity index 61% rename from Model/Plugin/Rate/Result.php rename to Plugin/Shipping/Model/Rate/Result.php index d2e12de..e17fb3e 100644 --- a/Model/Plugin/Rate/Result.php +++ b/Plugin/Shipping/Model/Rate/Result.php @@ -4,26 +4,26 @@ * * See COPYING.txt for license details. */ -namespace Faonni\ShippingTweaks\Model\Plugin\Rate; +namespace Faonni\ShippingTweaks\Plugin\Shipping\Model\Rate; use Faonni\ShippingTweaks\Helper\Data as ShippingTweaksHelper; /** - * Plugin for \Magento\Shipping\Model\Rate\Result + * Shipping Result Plugin */ class Result { /** - * Helper instance + * Helper * * @var \Faonni\ShippingTweaks\Helper\Data */ protected $_helper; /** - * Factory constructor - * - * @param \Faonni\ShippingTweaks\Helper\Data $helper + * Initialize Plugin + * + * @param ShippingTweaksHelper $helper */ public function __construct( ShippingTweaksHelper $helper @@ -32,11 +32,11 @@ public function __construct( } /** - * Return all rates in the result + * Return all Rates in the Result * - * @param $subject Magento\Shipping\Model\Rate\Result - * @param $result \Magento\Quote\Model\Quote\Address\RateResult\Method[] - * @return \Magento\Quote\Model\Quote\Address\RateResult\Method[] + * @param Result $subject + * @param Method[] $result + * @return Method[] */ public function afterGetAllRates($subject, $result) { @@ -48,10 +48,10 @@ public function afterGetAllRates($subject, $result) } /** - * Return all free rates in the result + * Return all free Rates in the Result * - * @param $result \Magento\Quote\Model\Quote\Address\RateResult\Method[] - * @return \Magento\Quote\Model\Quote\Address\RateResult\Method[] + * @param Method[] $result + * @return Method[] */ public function getAllFreeRates($result) { diff --git a/composer.json b/composer.json index 6c2d4fa..e55aa2c 100644 --- a/composer.json +++ b/composer.json @@ -2,17 +2,24 @@ "name": "faonni/module-shipping-tweaks", "description": "Extension hides any other shipping methods if free shipping is available.", "type": "magento2-module", - "version": "2.0.5", + "version": "2.0.6", + "authors": [{ + "name" : "Karliuka Vitalii", + "email": "karliuka.vitalii@gmail.com" + }], "license": [ "OSL-3.0" - ], + ], "require": { - "php": "~5.5.0|~5.6.0|~7.0.0" - }, + "php": "~5.5.0|~5.6.0|~7.0.0", + "magento/module-shipping": "100.0.*|100.1.*|100.2.*" + }, "autoload": { - "files": [ "registration.php" ], - "psr-4": { - "Faonni\\ShippingTweaks\\": "" + "files": [ + "registration.php" + ], + "psr-4": { + "Faonni\\ShippingTweaks\\": "" } } } diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index decf756..c9e2617 100755 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -10,6 +10,9 @@ xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
+ diff --git a/etc/di.xml b/etc/di.xml index 2d16ad3..2db4d9d 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -9,9 +9,9 @@ - + diff --git a/etc/module.xml b/etc/module.xml index fe23612..be0f0c1 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -8,5 +8,9 @@ --> - + + + + +