From ccb1a6e77df44ac5f581fdd4e84b17a323b421c5 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Thu, 24 Jan 2019 16:01:09 +0300 Subject: [PATCH] Fixes for marketplace --- src/Model/Icml/Icml.php | 5 ++--- src/Test/Unit/Block/Frontend/DaemonCollectorTest.php | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Model/Icml/Icml.php b/src/Model/Icml/Icml.php index 7cb770e..9419b5d 100644 --- a/src/Model/Icml/Icml.php +++ b/src/Model/Icml/Icml.php @@ -19,8 +19,7 @@ class Icml private $resourceModelProduct; private $searchCriteriaBuilder; private $productRepository; - - const DIMENSION_FIELDS = ['height', 'length', 'width']; + private $dimensionFields = ['height', 'length', 'width']; public function __construct( \Magento\Store\Model\StoreManagerInterface $manager, @@ -444,7 +443,7 @@ class Icml */ private function checkDimension($attrCode) { - foreach (self::DIMENSION_FIELDS as $dimensionField) { + foreach ($this->dimensionFields as $dimensionField) { if (mb_strpos($attrCode, $dimensionField) !== false) { return [$dimensionField => $attrCode]; } diff --git a/src/Test/Unit/Block/Frontend/DaemonCollectorTest.php b/src/Test/Unit/Block/Frontend/DaemonCollectorTest.php index 46aa1ba..a1f9809 100644 --- a/src/Test/Unit/Block/Frontend/DaemonCollectorTest.php +++ b/src/Test/Unit/Block/Frontend/DaemonCollectorTest.php @@ -1,5 +1,7 @@