@@ -21,12 +21,12 @@ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper implements Re
2121 /**
2222 * Path to list of attributes used for flat indexer
2323 */
24- const XML_NODE_ATTRIBUTE_NODES = 'global/catalog/product/flat/attribute_groups ' ;
24+ public const XML_NODE_ATTRIBUTE_NODES = 'global/catalog/product/flat/attribute_groups ' ;
2525
2626 /**
2727 * Size of ids batch for reindex
2828 */
29- const BATCH_SIZE = 500 ;
29+ public const BATCH_SIZE = 500 ;
3030
3131 /**
3232 * Resource instance
@@ -50,7 +50,7 @@ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper implements Re
5050 /**
5151 * Retrieve catalog product flat columns array in old format (used before MMDB support)
5252 *
53- * @return array
53+ * @var array
5454 */
5555 protected $ _attributes ;
5656
@@ -94,8 +94,6 @@ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper implements Re
9494 protected $ _flatAttributeGroups = [];
9595
9696 /**
97- * Config factory
98- *
9997 * @var \Magento\Catalog\Model\ResourceModel\ConfigFactory
10098 */
10199 protected $ _configFactory ;
@@ -257,6 +255,7 @@ public function getFlatColumns()
257255 $ this ->isAddChildData ()
258256 )->getFlatColumns ();
259257 if ($ columns !== null ) {
258+ // phpcs:ignore Magento2.Performance.ForeachArrayMerge
260259 $ this ->_columns = array_merge ($ this ->_columns , $ columns );
261260 }
262261 }
@@ -333,6 +332,7 @@ public function getAttributeCodes()
333332
334333 foreach ($ this ->_flatAttributeGroups as $ attributeGroupName ) {
335334 $ attributes = $ this ->_attributeConfig ->getAttributeNames ($ attributeGroupName );
335+ // phpcs:ignore Magento2.Performance.ForeachArrayMerge
336336 $ this ->_systemAttributes = array_unique (array_merge ($ attributes , $ this ->_systemAttributes ));
337337 }
338338
@@ -417,6 +417,7 @@ public function getFlatIndexes()
417417 $ this ->isAddChildData ()
418418 )->getFlatIndexes ();
419419 if ($ indexes !== null ) {
420+ // phpcs:ignore Magento2.Performance.ForeachArrayMerge
420421 $ this ->_indexes = array_merge ($ this ->_indexes , $ indexes );
421422 }
422423 }
0 commit comments