diff --git a/Block/CheckoutSuccess.php b/Block/CheckoutSuccess.php index ec58556..8690799 100644 --- a/Block/CheckoutSuccess.php +++ b/Block/CheckoutSuccess.php @@ -19,18 +19,18 @@ class CheckoutSuccess extends Template { /** - * @var \Magento\Checkout\Model\Session\Proxy + * @var \Magento\Checkout\Model\Session */ private $session; /** * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Checkout\Model\Session\Proxy $session + * @param \Magento\Checkout\Model\Session $session * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, - \Magento\Checkout\Model\Session\Proxy $session, + \Magento\Checkout\Model\Session $session, array $data ) { $this->session = $session; diff --git a/Model/Feed.php b/Model/Feed.php index 183b411..310928c 100644 --- a/Model/Feed.php +++ b/Model/Feed.php @@ -123,7 +123,9 @@ public function __construct( */ public function generate($storeId = null) { + // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged,Magento2.Functions.DiscouragedFunction.Discouraged @set_time_limit(0); + // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged,Magento2.Functions.DiscouragedFunction.Discouraged @ini_set('memory_limit', '-1'); if (empty($storeId) === true) { @@ -210,6 +212,7 @@ private function generateForStore(\Magento\Store\Api\Data\StoreInterface $store) */ public function getFeedFilename(\Magento\Store\Api\Data\StoreInterface $store) { + // phpcs:ignore Magento2.Security.InsecureFunction.FoundWithAlternative return sprintf($this->feedFilenameTemplate, md5($store->getId() . '#' . $store->getName() . '#' . $store->getCode()) . '-' . $store->getCode()); } diff --git a/Model/User.php b/Model/User.php index d7192ee..0bee8c8 100644 --- a/Model/User.php +++ b/Model/User.php @@ -41,7 +41,7 @@ class User private $customerSession; /** - * @var \Magento\Checkout\Model\Session\Proxy + * @var \Magento\Checkout\Model\Session */ private $checkoutSession; @@ -66,16 +66,16 @@ class User private $scopeConfig; /** - * @param \Magento\Customer\Model\Session\Proxy $customerSession - * @param \Magento\Checkout\Model\Session\Proxy $checkoutSession + * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository * @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig */ public function __construct( - \Magento\Customer\Model\Session\Proxy $customerSession, - \Magento\Checkout\Model\Session\Proxy $checkoutSession, + \Magento\Customer\Model\Session $customerSession, + \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Api\GroupRepositoryInterface $groupRepository, \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, diff --git a/README.md b/README.md index bd50b1b..e1491f6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ We recommend to proceed with the following preparational steps before you start #### Installation with Composer (recommended) 1. In the root directory of your Magento 2 installation install the Recolize Recommendation Engine Extension via the following composer command: ``` - composer require recolize/module-recommendation-engine-magento2 + composer require --no-dev recolize/module-recommendation-engine-magento2 ``` 2. Afterwards activate the Magento 2 Extension with the following commands: diff --git a/composer.json b/composer.json index 62f5fdf..f2ffa54 100644 --- a/composer.json +++ b/composer.json @@ -31,5 +31,16 @@ "psr-4": { "Recolize\\RecommendationEngine\\": "" } + }, + "require-dev": { + "magento/magento-coding-standard": "^5.0" + }, + "scripts": { + "post-install-cmd": [ + "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)" + ], + "post-update-cmd": [ + "([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/)" + ] } } \ No newline at end of file