11
11
/**
12
12
* Export entity abstract model
13
13
*
14
+ * phpcs:ignore Magento2.Classes.AbstractApi
14
15
* @api
15
16
*
16
17
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -48,8 +49,6 @@ abstract class AbstractEntity
48
49
protected $ _disabledAttrs = [];
49
50
50
51
/**
51
- * Entity type id.
52
- *
53
52
* @var int
54
53
*/
55
54
protected $ _entityTypeId ;
@@ -97,8 +96,6 @@ abstract class AbstractEntity
97
96
protected $ _messageTemplates = [];
98
97
99
98
/**
100
- * Parameters.
101
- *
102
99
* @var array
103
100
*/
104
101
protected $ _parameters = [];
@@ -175,8 +172,10 @@ public function __construct(
175
172
protected function _initStores ()
176
173
{
177
174
foreach ($ this ->_storeManager ->getStores (true ) as $ store ) {
175
+ // phpstan:ignore "Access to an undefined property"
178
176
$ this ->_storeIdToCode [$ store ->getId ()] = $ store ->getCode ();
179
177
}
178
+ // phpstan:ignore "Access to an undefined property"
180
179
ksort ($ this ->_storeIdToCode );
181
180
// to ensure that 'admin' store (ID is zero) goes first
182
181
@@ -251,6 +250,8 @@ protected function _initAttrValues()
251
250
* @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection
252
251
* @return \Magento\Eav\Model\Entity\Collection\AbstractCollection
253
252
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
253
+ * @SuppressWarnings(PHPMD.NPathComplexity)
254
+ * phpcs:disable Generic.Metrics.NestingLevel
254
255
*/
255
256
protected function _prepareEntityCollection (\Magento \Eav \Model \Entity \Collection \AbstractCollection $ collection )
256
257
{
@@ -335,6 +336,7 @@ protected function _prepareEntityCollection(\Magento\Eav\Model\Entity\Collection
335
336
}
336
337
return $ collection ;
337
338
}
339
+ //phpcs:enable Generic.Metrics.NestingLevel
338
340
339
341
/**
340
342
* Add error with corresponding current data source row number.
@@ -348,6 +350,7 @@ public function addRowError($errorCode, $errorRowNum)
348
350
$ errorCode = (string )$ errorCode ;
349
351
$ this ->_errors [$ errorCode ][] = $ errorRowNum + 1 ;
350
352
// one added for human readability
353
+ // phpstan:ignore "Access to an undefined property"
351
354
$ this ->_invalidRows [$ errorRowNum ] = true ;
352
355
$ this ->_errorsCount ++;
353
356
@@ -440,6 +443,7 @@ public function getAttributeOptions(\Magento\Eav\Model\Entity\Attribute\Abstract
440
443
}
441
444
}
442
445
}
446
+ // phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
443
447
} catch (\Exception $ e ) {
444
448
// ignore exceptions connected with source models
445
449
}
@@ -504,6 +508,7 @@ public function getErrorsCount()
504
508
*/
505
509
public function getInvalidRowsCount ()
506
510
{
511
+ // phpstan:ignore "Access to an undefined property"
507
512
return count ($ this ->_invalidRows );
508
513
}
509
514
@@ -569,6 +574,7 @@ public function setWriter(AbstractAdapter $writer)
569
574
570
575
/**
571
576
* Clean cached values
577
+ *
572
578
* @since 100.1.2
573
579
*/
574
580
public function __destruct ()
0 commit comments