From c83a28376898d1bde669bcbae2d3302697b08f95 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Tue, 23 Apr 2019 14:11:43 +0300 Subject: [PATCH] magento/magento2#22296: Static test fix. --- app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php | 1 + app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php | 2 ++ .../Magento/SalesSequence/Observer/SequenceRemovalObserver.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php b/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php index b46844cfab524..dd70a9d2393bb 100644 --- a/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php +++ b/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php @@ -153,6 +153,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) || $object->getData('store_id') === null || !$object->getData('sequence_table') ) { + // phpcs:ignore Magento2.Exceptions.DirectThrow throw new Exception(__('Not enough arguments')); } diff --git a/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php b/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php index bb9b5d19c70eb..f5e4e8e54eb4b 100644 --- a/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php +++ b/app/code/Magento/SalesSequence/Model/ResourceModel/Profile.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\SalesSequence\Model\ResourceModel; use Magento\Framework\Model\ResourceModel\Db\Context as DatabaseContext; @@ -79,6 +80,7 @@ public function loadActiveProfile($metadataId) /** * Get profile ids by metadata ids + * * @param int[] $metadataIds * @return int[] * @throws \Magento\Framework\Exception\LocalizedException diff --git a/app/code/Magento/SalesSequence/Observer/SequenceRemovalObserver.php b/app/code/Magento/SalesSequence/Observer/SequenceRemovalObserver.php index 1e439c1776080..8bbdb9b12eaeb 100644 --- a/app/code/Magento/SalesSequence/Observer/SequenceRemovalObserver.php +++ b/app/code/Magento/SalesSequence/Observer/SequenceRemovalObserver.php @@ -31,6 +31,8 @@ public function __construct( } /** + * Deletes all sequence linked entities. + * * @param EventObserver $observer * @return $this * @throws \Magento\Framework\Exception\LocalizedException