@@ -145,6 +145,18 @@ abstract class AbstractEntity
145
145
*/
146
146
protected $ _storeManager ;
147
147
148
+ /**
149
+ * Array of pairs store ID to its code.
150
+ *
151
+ * @var array
152
+ */
153
+ protected $ _storeIdToCode = [];
154
+
155
+ /**
156
+ * @var array
157
+ */
158
+ private $ _invalidRows = [];
159
+
148
160
/**
149
161
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
150
162
* @param \Magento\Eav\Model\Config $config
@@ -172,10 +184,8 @@ public function __construct(
172
184
protected function _initStores ()
173
185
{
174
186
foreach ($ this ->_storeManager ->getStores (true ) as $ store ) {
175
- // phpstan:ignore "Access to an undefined property"
176
187
$ this ->_storeIdToCode [$ store ->getId ()] = $ store ->getCode ();
177
188
}
178
- // phpstan:ignore "Access to an undefined property"
179
189
ksort ($ this ->_storeIdToCode );
180
190
// to ensure that 'admin' store (ID is zero) goes first
181
191
@@ -350,7 +360,6 @@ public function addRowError($errorCode, $errorRowNum)
350
360
$ errorCode = (string )$ errorCode ;
351
361
$ this ->_errors [$ errorCode ][] = $ errorRowNum + 1 ;
352
362
// one added for human readability
353
- // phpstan:ignore "Access to an undefined property"
354
363
$ this ->_invalidRows [$ errorRowNum ] = true ;
355
364
$ this ->_errorsCount ++;
356
365
@@ -508,7 +517,6 @@ public function getErrorsCount()
508
517
*/
509
518
public function getInvalidRowsCount ()
510
519
{
511
- // phpstan:ignore "Access to an undefined property"
512
520
return count ($ this ->_invalidRows );
513
521
}
514
522
0 commit comments