1111/**
1212 * Export entity abstract model
1313 *
14+ * phpcs:ignore Magento2.Classes.AbstractApi
1415 * @api
1516 *
1617 * @SuppressWarnings(PHPMD.TooManyFields)
@@ -48,8 +49,6 @@ abstract class AbstractEntity
4849 protected $ _disabledAttrs = [];
4950
5051 /**
51- * Entity type id.
52- *
5352 * @var int
5453 */
5554 protected $ _entityTypeId ;
@@ -97,8 +96,6 @@ abstract class AbstractEntity
9796 protected $ _messageTemplates = [];
9897
9998 /**
100- * Parameters.
101- *
10299 * @var array
103100 */
104101 protected $ _parameters = [];
@@ -175,8 +172,10 @@ public function __construct(
175172 protected function _initStores ()
176173 {
177174 foreach ($ this ->_storeManager ->getStores (true ) as $ store ) {
175+ // phpstan:ignore "Access to an undefined property"
178176 $ this ->_storeIdToCode [$ store ->getId ()] = $ store ->getCode ();
179177 }
178+ // phpstan:ignore "Access to an undefined property"
180179 ksort ($ this ->_storeIdToCode );
181180 // to ensure that 'admin' store (ID is zero) goes first
182181
@@ -251,6 +250,8 @@ protected function _initAttrValues()
251250 * @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection
252251 * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection
253252 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
253+ * @SuppressWarnings(PHPMD.NPathComplexity)
254+ * phpcs:disable Generic.Metrics.NestingLevel
254255 */
255256 protected function _prepareEntityCollection (\Magento \Eav \Model \Entity \Collection \AbstractCollection $ collection )
256257 {
@@ -335,6 +336,7 @@ protected function _prepareEntityCollection(\Magento\Eav\Model\Entity\Collection
335336 }
336337 return $ collection ;
337338 }
339+ //phpcs:enable Generic.Metrics.NestingLevel
338340
339341 /**
340342 * Add error with corresponding current data source row number.
@@ -348,6 +350,7 @@ public function addRowError($errorCode, $errorRowNum)
348350 $ errorCode = (string )$ errorCode ;
349351 $ this ->_errors [$ errorCode ][] = $ errorRowNum + 1 ;
350352 // one added for human readability
353+ // phpstan:ignore "Access to an undefined property"
351354 $ this ->_invalidRows [$ errorRowNum ] = true ;
352355 $ this ->_errorsCount ++;
353356
@@ -440,6 +443,7 @@ public function getAttributeOptions(\Magento\Eav\Model\Entity\Attribute\Abstract
440443 }
441444 }
442445 }
446+ // phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
443447 } catch (\Exception $ e ) {
444448 // ignore exceptions connected with source models
445449 }
@@ -504,6 +508,7 @@ public function getErrorsCount()
504508 */
505509 public function getInvalidRowsCount ()
506510 {
511+ // phpstan:ignore "Access to an undefined property"
507512 return count ($ this ->_invalidRows );
508513 }
509514
@@ -569,6 +574,7 @@ public function setWriter(AbstractAdapter $writer)
569574
570575 /**
571576 * Clean cached values
577+ *
572578 * @since 100.1.2
573579 */
574580 public function __destruct ()
0 commit comments