diff --git a/Block/Adminhtml/Order/View/GuestToCustomerButtonList.php b/Block/Adminhtml/Order/View/GuestToCustomerButtonList.php index 2c0c12a..ad1ed92 100644 --- a/Block/Adminhtml/Order/View/GuestToCustomerButtonList.php +++ b/Block/Adminhtml/Order/View/GuestToCustomerButtonList.php @@ -1,26 +1,41 @@ registry('current_order'); if ($helperData->isEnabled() && $order && !$order->getCustomerId()) { diff --git a/Block/Adminhtml/System/Config/Form/Composer/Version.php b/Block/Adminhtml/System/Config/Form/Composer/Version.php index f27f583..ac82f21 100644 --- a/Block/Adminhtml/System/Config/Form/Composer/Version.php +++ b/Block/Adminhtml/System/Config/Form/Composer/Version.php @@ -2,39 +2,56 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ namespace MagePal\GuestToCustomer\Block\Adminhtml\System\Config\Form\Composer; -class Version extends \Magento\Config\Block\System\Config\Form\Field +use Exception; +use Magento\Backend\Block\Template\Context; +use Magento\Config\Block\System\Config\Form\Field; +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Component\ComponentRegistrar; +use Magento\Framework\Component\ComponentRegistrarInterface; +use Magento\Framework\Data\Form\Element\AbstractElement; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Filesystem\Directory\ReadFactory; +use Magento\Framework\Phrase; + +/** + * Class Version + * @package MagePal\GuestToCustomer\Block\Adminhtml\System\Config\Form\Composer + */ +class Version extends Field { /** - * @var \Magento\Framework\App\DeploymentConfig + * @var DeploymentConfig */ protected $deploymentConfig; /** - * @var \Magento\Framework\Component\ComponentRegistrarInterface + * @var ComponentRegistrarInterface */ protected $componentRegistrar; /** - * @var \Magento\Framework\Filesystem\Directory\ReadFactory + * @var ReadFactory */ protected $readFactory; /** - * @param \Magento\Framework\App\DeploymentConfig $deploymentConfig - * @param \Magento\Framework\Component\ComponentRegistrarInterface $componentRegistrar - * @param \Magento\Framework\Filesystem\Directory\ReadFactory $readFactory + * @param Context $context + * @param DeploymentConfig $deploymentConfig + * @param ComponentRegistrarInterface $componentRegistrar + * @param ReadFactory $readFactory + * @param array $data */ public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Framework\App\DeploymentConfig $deploymentConfig, - \Magento\Framework\Component\ComponentRegistrarInterface $componentRegistrar, - \Magento\Framework\Filesystem\Directory\ReadFactory $readFactory, + Context $context, + DeploymentConfig $deploymentConfig, + ComponentRegistrarInterface $componentRegistrar, + ReadFactory $readFactory, array $data = [] ) { $this->deploymentConfig = $deploymentConfig; @@ -46,11 +63,11 @@ public function __construct( /** * Render button * - * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @param AbstractElement $element * @return string - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) + public function render(AbstractElement $element) { // Remove scope label $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); @@ -60,11 +77,11 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele /** * Return element html * - * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @param AbstractElement $element * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(AbstractElement $element) { return 'v' . $this->getVersion(); } @@ -93,12 +110,12 @@ public function getModuleName() * Get module composer version * * @param $moduleName - * @return \Magento\Framework\Phrase|string|void + * @return Phrase|string|void */ public function getComposerVersion($moduleName) { $path = $this->componentRegistrar->getPath( - \Magento\Framework\Component\ComponentRegistrar::MODULE, + ComponentRegistrar::MODULE, $moduleName ); @@ -110,7 +127,7 @@ public function getComposerVersion($moduleName) $data = json_decode($composerJsonData); return !empty($data->version) ? $data->version : __('Unknown'); } - } catch (\Exception $e) { + } catch (Exception $e) { // } diff --git a/Block/Adminhtml/System/Config/Form/Module/Version.php b/Block/Adminhtml/System/Config/Form/Module/Version.php index 377ed4f..09b7488 100644 --- a/Block/Adminhtml/System/Config/Form/Module/Version.php +++ b/Block/Adminhtml/System/Config/Form/Module/Version.php @@ -2,27 +2,37 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ namespace MagePal\GuestToCustomer\Block\Adminhtml\System\Config\Form\Module; -class Version extends \Magento\Config\Block\System\Config\Form\Field +use Magento\Backend\Block\Template\Context; +use Magento\Config\Block\System\Config\Form\Field; +use Magento\Framework\Data\Form\Element\AbstractElement; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Module\ModuleListInterface; + +/** + * Class Version + * @package MagePal\GuestToCustomer\Block\Adminhtml\System\Config\Form\Module + */ +class Version extends Field { /** - * @var \Magento\Framework\Module\ModuleListInterface + * @var ModuleListInterface */ protected $_moduleList; /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param Context $context + * @param ModuleListInterface $moduleList * @param array $data */ public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Framework\Module\ModuleListInterface $moduleList, + Context $context, + ModuleListInterface $moduleList, array $data = [] ) { parent::__construct($context, $data); @@ -32,11 +42,11 @@ public function __construct( /** * Render button * - * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @param AbstractElement $element * @return string - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) + public function render(AbstractElement $element) { // Remove scope label $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); @@ -46,11 +56,11 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele /** * Return element html * - * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @param AbstractElement $element * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(AbstractElement $element) { return 'v' . $this->getVersion(); } diff --git a/Block/Customer/LookupForm.php b/Block/Customer/LookupForm.php index fa57a81..aba5300 100644 --- a/Block/Customer/LookupForm.php +++ b/Block/Customer/LookupForm.php @@ -2,28 +2,38 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ namespace MagePal\GuestToCustomer\Block\Customer; use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Model\Session; +use Magento\Framework\View\Element\Template; +use Magento\Framework\View\Element\Template\Context; +use Magento\Newsletter\Model\Subscriber; +use Magento\Newsletter\Model\SubscriberFactory; -class LookupForm extends \Magento\Framework\View\Element\Template +/** + * Class LookupForm + * @package MagePal\GuestToCustomer\Block\Customer + */ +class LookupForm extends Template { /** - * @var \Magento\Newsletter\Model\Subscriber + * @var Subscriber */ protected $subscription; /** - * @var \Magento\Customer\Model\Session + * @var Session */ protected $customerSession; /** - * @var \Magento\Newsletter\Model\SubscriberFactory + * @var SubscriberFactory */ protected $subscriberFactory; @@ -37,10 +47,19 @@ class LookupForm extends \Magento\Framework\View\Element\Template */ protected $customerAccountManagement; + /** + * LookupForm constructor. + * @param Context $context + * @param Session $customerSession + * @param SubscriberFactory $subscriberFactory + * @param CustomerRepositoryInterface $customerRepository + * @param AccountManagementInterface $customerAccountManagement + * @param array $data + */ public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Customer\Model\Session $customerSession, - \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, + Context $context, + Session $customerSession, + SubscriberFactory $subscriberFactory, CustomerRepositoryInterface $customerRepository, AccountManagementInterface $customerAccountManagement, array $data = [] @@ -55,7 +74,7 @@ public function __construct( /** * Return the Customer given the customer Id stored in the session. * - * @return \Magento\Customer\Api\Data\CustomerInterface + * @return CustomerInterface */ public function getCustomer() { diff --git a/Block/View/Element/Html/Link/Current.php b/Block/View/Element/Html/Link/Current.php index 79f1612..95c46f9 100644 --- a/Block/View/Element/Html/Link/Current.php +++ b/Block/View/Element/Html/Link/Current.php @@ -2,28 +2,37 @@ /** * Copyright © MagePal LLC, Inc. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com + * https://www.magepal.com | support@magepal.com */ namespace MagePal\GuestToCustomer\Block\View\Element\Html\Link; +use Magento\Framework\App\DefaultPathInterface; +use Magento\Framework\View\Element\Template\Context; +use MagePal\GuestToCustomer\Helper\Data; + +/** + * Class Current + * @package MagePal\GuestToCustomer\Block\View\Element\Html\Link + */ class Current extends \Magento\Framework\View\Element\Html\Link\Current { - /* @var \MagePal\GuestToCustomer\Helper\Data*/ + /* @var Data*/ protected $helperData; /** * Constructor * - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \MagePal\GuestToCustomer\Helper\Data $helperData + * @param Context $context + * @param DefaultPathInterface $defaultPath * @param array $data + * @param Data $helperData */ public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\App\DefaultPathInterface $defaultPath, + Context $context, + DefaultPathInterface $defaultPath, array $data = [], - \MagePal\GuestToCustomer\Helper\Data $helperData + Data $helperData ) { parent::__construct($context, $defaultPath, $data); $this->helperData = $helperData; diff --git a/Controller/Adminhtml/Customer/Index.php b/Controller/Adminhtml/Customer/Index.php index b1eb78d..ee337ea 100644 --- a/Controller/Adminhtml/Customer/Index.php +++ b/Controller/Adminhtml/Customer/Index.php @@ -7,52 +7,65 @@ namespace MagePal\GuestToCustomer\Controller\Adminhtml\Customer; +use Exception; use Magento\Backend\App\Action; use Magento\Backend\App\Action\Context; +use Magento\Customer\Api\AccountManagementInterface; +use Magento\Framework\Controller\Result\Json; +use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Framework\Exception\LocalizedException; +use Magento\Sales\Api\Data\OrderInterface; +use Magento\Sales\Api\OrderCustomerManagementInterface; +use Magento\Sales\Api\OrderRepositoryInterface; +use MagePal\GuestToCustomer\Helper\Data; +/** + * Class Index + * @package MagePal\GuestToCustomer\Controller\Adminhtml\Customer + */ class Index extends Action { /** - * @var \Magento\Sales\Api\OrderRepositoryInterface + * @var OrderRepositoryInterface */ protected $orderRepository; /** - * @var \Magento\Customer\Api\AccountManagementInterface + * @var AccountManagementInterface */ protected $accountManagement; /** - * @var \Magento\Sales\Api\OrderCustomerManagementInterface + * @var OrderCustomerManagementInterface */ protected $orderCustomerService; /** - * @var \Magento\Framework\Controller\Result\JsonFactory + * @var JsonFactory */ protected $resultJsonFactory; /** - * @var \MagePal\GuestToCustomer\Helper\Data + * @var Data */ protected $helperData; /** * Index constructor. * @param Context $context - * @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository - * @param \Magento\Customer\Api\AccountManagementInterface $accountManagement - * @param \Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService - * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory - * @param \MagePal\GuestToCustomer\Helper\Data $helperData + * @param OrderRepositoryInterface $orderRepository + * @param AccountManagementInterface $accountManagement + * @param OrderCustomerManagementInterface $orderCustomerService + * @param JsonFactory $resultJsonFactory + * @param Data $helperData */ public function __construct( Context $context, - \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, - \Magento\Customer\Api\AccountManagementInterface $accountManagement, - \Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService, - \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory, - \MagePal\GuestToCustomer\Helper\Data $helperData + OrderRepositoryInterface $orderRepository, + AccountManagementInterface $accountManagement, + OrderCustomerManagementInterface $orderCustomerService, + JsonFactory $resultJsonFactory, + Data $helperData ) { parent::__construct($context); @@ -65,9 +78,9 @@ public function __construct( /** * Index action - * @return \Magento\Framework\Controller\Result\Json - * @throws \Exception - * @throws \Magento\Framework\Exception\LocalizedException + * @return Json + * @throws Exception + * @throws LocalizedException */ public function execute() { @@ -76,7 +89,7 @@ public function execute() $resultJson = $this->resultJsonFactory->create(); if ($orderId) { - /** @var $order \Magento\Sales\Api\Data\OrderInterface */ + /** @var $order OrderInterface */ $order = $this->orderRepository->get($orderId); if ($order->getEntityId() && $this->accountManagement->isEmailAvailable($order->getEmailAddress())) { @@ -95,7 +108,7 @@ public function execute() 'message' => __('Order was successfully converted.') ] ); - } catch (\Exception $e) { + } catch (Exception $e) { return $resultJson->setData( [ 'error' => true, diff --git a/Controller/Guesttocustomer/Lookupform.php b/Controller/Guesttocustomer/Lookupform.php index 151c0fc..e9dc169 100644 --- a/Controller/Guesttocustomer/Lookupform.php +++ b/Controller/Guesttocustomer/Lookupform.php @@ -2,20 +2,29 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ namespace MagePal\GuestToCustomer\Controller\Guesttocustomer; +use Magento\Customer\Controller\AbstractAccount; use Magento\Customer\Model\Session; use Magento\Framework\App\Action\Context; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\ResponseInterface; +use Magento\Framework\Controller\Result\Redirect; +use Magento\Framework\Exception\NotFoundException; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; +use MagePal\GuestToCustomer\Helper\Data; -class Lookupform extends \Magento\Customer\Controller\AbstractAccount +/** + * Class Lookupform + * @package MagePal\GuestToCustomer\Controller\Guesttocustomer + */ +class Lookupform extends AbstractAccount { /** - * @var \MagePal\GuestToCustomer\Helper\Data + * @var Data */ protected $helperData; @@ -33,12 +42,13 @@ class Lookupform extends \Magento\Customer\Controller\AbstractAccount * @param Context $context * @param Session $customerSession * @param PageFactory $resultPageFactory + * @param Data $helperData */ public function __construct( Context $context, Session $customerSession, PageFactory $resultPageFactory, - \MagePal\GuestToCustomer\Helper\Data $helperData + Data $helperData ) { $this->resultPageFactory = $resultPageFactory; $this->session = $customerSession; @@ -50,11 +60,11 @@ public function __construct( /** * Customer login form page * - * @return \Magento\Framework\Controller\Result\Redirect|\Magento\Framework\View\Result\Page + * @return Redirect|Page */ public function execute() { - /** @var \Magento\Framework\View\Result\Page $resultPage */ + /** @var Page $resultPage */ $resultPage = $this->resultPageFactory->create(); // $title = __('Guest to customer'); @@ -68,12 +78,16 @@ public function execute() * @param RequestInterface $request * * @return ResponseInterface - * @throws \Magento\Framework\Exception\NotFoundException + * @throws NotFoundException */ public function dispatch(RequestInterface $request) { if (!$this->helperData->isEnabledCustomerDashbard() || !$this->session->isLoggedIn()) { - $this->_redirect('customer/account/login'); + /** @var Redirect $resultRedirect */ + $resultRedirect = $this->resultRedirectFactory->create(); + $resultRedirect->setPath('customer/account/login'); + + return $resultRedirect; } return parent::dispatch($request); diff --git a/Controller/Guesttocustomer/LookupformPost.php b/Controller/Guesttocustomer/LookupformPost.php index 65cd669..2f1956a 100644 --- a/Controller/Guesttocustomer/LookupformPost.php +++ b/Controller/Guesttocustomer/LookupformPost.php @@ -2,21 +2,32 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ namespace MagePal\GuestToCustomer\Controller\Guesttocustomer; +use Magento\Customer\Controller\AbstractAccount; use Magento\Customer\Model\Session; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\App\Action\Context; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\ResponseInterface; +use Magento\Framework\Controller\Result\Redirect; use Magento\Framework\Data\Form\FormKey\Validator; +use Magento\Framework\Exception\NotFoundException; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; +use Magento\Sales\Api\OrderRepositoryInterface; +use MagePal\GuestToCustomer\Helper\Data; -class LookupformPost extends \Magento\Customer\Controller\AbstractAccount +/** + * Class LookupformPost + * @package MagePal\GuestToCustomer\Controller\Guesttocustomer + */ +class LookupformPost extends AbstractAccount { /** - * @var \MagePal\GuestToCustomer\Helper\Data + * @var Data */ protected $helperData; @@ -31,7 +42,7 @@ class LookupformPost extends \Magento\Customer\Controller\AbstractAccount protected $resultPageFactory; /** - * @var \Magento\Sales\Api\OrderRepositoryInterface + * @var OrderRepositoryInterface */ protected $orderRepository; @@ -41,7 +52,7 @@ class LookupformPost extends \Magento\Customer\Controller\AbstractAccount protected $formKeyValidator; /** - * @var \Magento\Framework\Api\SearchCriteriaBuilder + * @var SearchCriteriaBuilder */ protected $searchCriteriaBuilder; @@ -49,18 +60,18 @@ class LookupformPost extends \Magento\Customer\Controller\AbstractAccount * @param Context $context * @param Session $customerSession * @param PageFactory $resultPageFactory - * @param \MagePal\GuestToCustomer\Helper\Data $helperData - * @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository - * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder + * @param Data $helperData + * @param OrderRepositoryInterface $orderRepository + * @param SearchCriteriaBuilder $searchCriteriaBuilder * @param Validator $formKeyValidator */ public function __construct( Context $context, Session $customerSession, PageFactory $resultPageFactory, - \MagePal\GuestToCustomer\Helper\Data $helperData, - \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, - \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, + Data $helperData, + OrderRepositoryInterface $orderRepository, + SearchCriteriaBuilder $searchCriteriaBuilder, Validator $formKeyValidator ) { $this->resultPageFactory = $resultPageFactory; @@ -76,11 +87,11 @@ public function __construct( /** * Customer login form page * - * @return \Magento\Framework\Controller\Result\Redirect|\Magento\Framework\View\Result\Page + * @return Redirect|Page */ public function execute() { - /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ + /** @var Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); $validFormKey = $this->formKeyValidator->validate($this->getRequest()); @@ -120,12 +131,16 @@ public function execute() * @param RequestInterface $request * * @return ResponseInterface - * @throws \Magento\Framework\Exception\NotFoundException + * @throws NotFoundException */ public function dispatch(RequestInterface $request) { if (!$this->helperData->isEnabledCustomerDashbard() || !$this->session->isLoggedIn()) { - $this->_redirect('customer/account/login'); + /** @var Redirect $resultRedirect */ + $resultRedirect = $this->resultRedirectFactory->create(); + $resultRedirect->setPath('customer/account/login'); + + return $resultRedirect; } return parent::dispatch($request); diff --git a/Helper/Data.php b/Helper/Data.php index 668cb6f..8a50320 100755 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -2,22 +2,27 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ namespace MagePal\GuestToCustomer\Helper; -class Data extends \Magento\Framework\App\Helper\AbstractHelper +use Magento\Framework\App\Helper\AbstractHelper; +use Magento\Framework\App\Helper\Context; +use Magento\Framework\ObjectManagerInterface; +use Magento\Store\Model\ScopeInterface; + +class Data extends AbstractHelper { const XML_PATH_ACTIVE = 'guesttocustomer/general/active'; const XML_CUSTOMER_DASHBOARD = 'guesttocustomer/general/customer_dashboard'; /** - * @param \Magento\Framework\App\Helper\Context $context - * @param \Magento\Framework\ObjectManagerInterface + * @param Context $context + * @param ObjectManagerInterface */ public function __construct( - \Magento\Framework\App\Helper\Context $context + Context $context ) { parent::__construct($context); } @@ -31,7 +36,7 @@ public function isEnabled() { return $this->scopeConfig->isSetFlag( self::XML_PATH_ACTIVE, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ScopeInterface::SCOPE_STORE ); } @@ -44,7 +49,7 @@ public function isEnabledCustomerDashbard() { return $this->isEnabled() && $this->scopeConfig->getValue( self::XML_CUSTOMER_DASHBOARD, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ScopeInterface::SCOPE_STORE ); } diff --git a/Observer/UpdateDownloadableProductObserver.php b/Observer/UpdateDownloadableProductObserver.php index 8303cb7..4c17be5 100644 --- a/Observer/UpdateDownloadableProductObserver.php +++ b/Observer/UpdateDownloadableProductObserver.php @@ -2,33 +2,39 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com + * https://www.magepal.com | support@magepal.com */ namespace MagePal\GuestToCustomer\Observer; +use Exception; +use Magento\Downloadable\Model\Link\PurchasedFactory; use Magento\Framework\Event\Observer as EventObserver; use Magento\Framework\Event\ObserverInterface; +/** + * Class UpdateDownloadableProductObserver + * @package MagePal\GuestToCustomer\Observer + */ class UpdateDownloadableProductObserver implements ObserverInterface { /** - * @var \Magento\Downloadable\Model\Link\PurchasedFactory + * @var PurchasedFactory */ protected $purchasedFactory; /** - * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory + * @param PurchasedFactory $purchasedFactory */ public function __construct( - \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory + PurchasedFactory $purchasedFactory ) { $this->purchasedFactory = $purchasedFactory; } /** * @param EventObserver $observer - * @throws \Exception + * @throws Exception */ public function execute(EventObserver $observer) { @@ -47,7 +53,7 @@ public function execute(EventObserver $observer) $purchased->save(); } } - } catch (\Exception $e) { + } catch (Exception $e) { //do nothing } } diff --git a/README.md b/README.md index 6459b1c..c3b26cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Magento Extensions for Ecommerce +Magento Extensions for Ecommerce ## Guest to Customer for Magento 2.0 diff --git a/composer.json b/composer.json index 00af927..3e9be4c 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "license": [ "proprietary" ], - "homepage": "http://www.magepal.com/", + "homepage": "https://www.magepal.com/", "support": { "email": "support@magepal.com", "issues": "https://github.com/magepal/magento2-guest-to-customer/issues/" @@ -21,17 +21,17 @@ { "name": "Renon Stewart", "email": "renon@magepal.com", - "homepage": "http://www.magepal.com/", + "homepage": "https://www.magepal.com/", "role": "Leader" } ], "require": { "php": "~5.6.0|7.0.2|7.0.4|~7.0.6|~7.1.0|~7.1.3|~7.2.0", - "magento/module-backend": "100.0.*|100.1.*|100.2.*|101.0.0", + "magento/module-backend": "100.0.*|100.1.*|100.2.*|101.0.*", "magento/framework": "100.0.*|100.1.*|101.0.*|102.0.*" }, "type": "magento2-module", - "version": "1.2.2", + "version": "1.2.3", "autoload": { "files": [ "registration.php" diff --git a/etc/acl.xml b/etc/acl.xml index c659d6c..714a0d8 100644 --- a/etc/acl.xml +++ b/etc/acl.xml @@ -5,8 +5,8 @@ * * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ --> diff --git a/etc/adminhtml/routes.xml b/etc/adminhtml/routes.xml index 9b3b041..ca13ed3 100644 --- a/etc/adminhtml/routes.xml +++ b/etc/adminhtml/routes.xml @@ -3,8 +3,8 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ --> diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index b13aaa3..5c56dea 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -3,8 +3,8 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ --> @@ -20,8 +20,8 @@ 1 Copyright © 2019 www.magepal.com / support@magepal.com
- Discover other must have extensions at www.magepal.com. Thanks for choosing MagePal Extensions.

+ Copyright © 2019 www.magepal.com / support@magepal.com
+ Discover other must have extensions at www.magepal.com. Thanks for choosing MagePal Extensions.


]]>
diff --git a/etc/frontend/routes.xml b/etc/frontend/routes.xml index 41f75d9..bde8e0f 100644 --- a/etc/frontend/routes.xml +++ b/etc/frontend/routes.xml @@ -3,8 +3,8 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ --> diff --git a/view/adminhtml/layout/sales_order_view.xml b/view/adminhtml/layout/sales_order_view.xml index 663b0d6..af20f4f 100644 --- a/view/adminhtml/layout/sales_order_view.xml +++ b/view/adminhtml/layout/sales_order_view.xml @@ -3,8 +3,8 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ --> diff --git a/view/frontend/layout/customer_account.xml b/view/frontend/layout/customer_account.xml index a63dc7d..c7b9daf 100644 --- a/view/frontend/layout/customer_account.xml +++ b/view/frontend/layout/customer_account.xml @@ -3,8 +3,8 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ --> diff --git a/view/frontend/layout/customer_guesttocustomer_lookupform.xml b/view/frontend/layout/customer_guesttocustomer_lookupform.xml index b58ae8c..0ac3d02 100644 --- a/view/frontend/layout/customer_guesttocustomer_lookupform.xml +++ b/view/frontend/layout/customer_guesttocustomer_lookupform.xml @@ -3,8 +3,8 @@ /** * Copyright © MagePal LLC. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ + * https://www.magepal.com | support@magepal.com + */ --> diff --git a/view/frontend/templates/customer/lookupform.phtml b/view/frontend/templates/customer/lookupform.phtml index 45c3eb6..d67bd5b 100644 --- a/view/frontend/templates/customer/lookupform.phtml +++ b/view/frontend/templates/customer/lookupform.phtml @@ -2,13 +2,10 @@ /** * Copyright © 2016 Expandlab. All rights reserved. * See COPYING.txt for license details. - * http://www.magepal.com | support@magepal.com -*/ - -/** - * @var $block MagePal\GuestToCustomer\Block\Customer\LookupForm + * https://www.magepal.com | support@magepal.com */ +/** @var $block MagePal\GuestToCustomer\Block\Customer\LookupForm */ ?>