8
8
9
9
namespace Magento \Catalog \Model \Indexer \Product \Price \Action ;
10
10
11
- use Exception ;
12
11
use Magento \Catalog \Model \Indexer \Product \Price \AbstractAction ;
13
12
use Magento \Catalog \Model \Indexer \Product \Price \DimensionCollectionFactory ;
14
13
use Magento \Catalog \Model \Indexer \Product \Price \TableMaintainer ;
37
36
use Magento \Indexer \Model \ProcessManager ;
38
37
use Magento \Store \Model \Indexer \WebsiteDimensionProvider ;
39
38
use Magento \Store \Model \StoreManagerInterface ;
40
- use SplFixedArray ;
41
39
42
40
/**
43
41
* Class Full reindex action
@@ -167,7 +165,7 @@ public function __construct(
167
165
*
168
166
* @param array|int|null $ids
169
167
* @return void
170
- * @throws Exception
168
+ * @throws \ Exception
171
169
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
172
170
*/
173
171
public function execute ($ ids = null ): void
@@ -192,7 +190,7 @@ public function execute($ids = null): void
192
190
193
191
//Final replacement of tables from replica to main
194
192
$ this ->switchTables ();
195
- } catch (Exception $ e ) {
193
+ } catch (\ Exception $ e ) {
196
194
throw new LocalizedException (__ ($ e ->getMessage ()), $ e );
197
195
}
198
196
}
@@ -201,7 +199,7 @@ public function execute($ids = null): void
201
199
* Prepare indexer tables before full reindex
202
200
*
203
201
* @return void
204
- * @throws Exception
202
+ * @throws \ Exception
205
203
*/
206
204
private function prepareTables (): void
207
205
{
@@ -216,7 +214,7 @@ private function prepareTables(): void
216
214
* Truncate replica tables by dimensions
217
215
*
218
216
* @return void
219
- * @throws Exception
217
+ * @throws \ Exception
220
218
*/
221
219
private function truncateReplicaTables (): void
222
220
{
@@ -233,7 +231,7 @@ private function truncateReplicaTables(): void
233
231
* @param string $typeId
234
232
*
235
233
* @return void
236
- * @throws Exception
234
+ * @throws \ Exception
237
235
*/
238
236
private function reindexProductTypeWithDimensions (DimensionalIndexerInterface $ priceIndexer , string $ typeId ): void
239
237
{
@@ -254,7 +252,7 @@ private function reindexProductTypeWithDimensions(DimensionalIndexerInterface $p
254
252
* @param string $typeId
255
253
*
256
254
* @return void
257
- * @throws Exception
255
+ * @throws \ Exception
258
256
*/
259
257
private function reindexByBatches (
260
258
DimensionalIndexerInterface $ priceIndexer ,
@@ -272,7 +270,7 @@ private function reindexByBatches(
272
270
* @param string $typeId
273
271
*
274
272
* @return BatchIterator
275
- * @throws Exception
273
+ * @throws \ Exception
276
274
*/
277
275
private function getBatchesForIndexer (string $ typeId ): BatchIterator
278
276
{
@@ -300,7 +298,7 @@ private function getBatchesForIndexer(string $typeId): BatchIterator
300
298
* @param array $dimensions
301
299
*
302
300
* @return void
303
- * @throws Exception
301
+ * @throws \ Exception
304
302
*/
305
303
private function reindexByBatchWithDimensions (
306
304
DimensionalIndexerInterface $ priceIndexer ,
@@ -314,7 +312,7 @@ private function reindexByBatchWithDimensions(
314
312
$ temporaryTable = $ this ->dimensionTableMaintainer ->getMainTmpTable ($ dimensions );
315
313
$ this ->_emptyTable ($ temporaryTable );
316
314
317
- $ priceIndexer ->executeByDimensions ($ dimensions , SplFixedArray::fromArray ($ entityIds , false ));
315
+ $ priceIndexer ->executeByDimensions ($ dimensions , \ SplFixedArray::fromArray ($ entityIds , false ));
318
316
319
317
// Sync data from temp table to index table
320
318
$ this ->_insertFromTable (
@@ -331,7 +329,7 @@ private function reindexByBatchWithDimensions(
331
329
* @param string $typeId
332
330
*
333
331
* @return void
334
- * @throws Exception
332
+ * @throws \ Exception
335
333
*/
336
334
private function reindexProductType (PriceInterface $ priceIndexer , string $ typeId ): void
337
335
{
@@ -346,7 +344,7 @@ private function reindexProductType(PriceInterface $priceIndexer, string $typeId
346
344
* @param PriceInterface $priceIndexer
347
345
* @param Select $batch
348
346
* @return void
349
- * @throws Exception
347
+ * @throws \ Exception
350
348
*/
351
349
private function reindexBatch (PriceInterface $ priceIndexer , Select $ batch ): void
352
350
{
@@ -377,7 +375,7 @@ private function reindexBatch(PriceInterface $priceIndexer, Select $batch): void
377
375
*
378
376
* @param Select $batch
379
377
* @return array
380
- * @throws Exception
378
+ * @throws \ Exception
381
379
*/
382
380
private function getEntityIdsFromBatch (Select $ batch ): array
383
381
{
@@ -390,7 +388,7 @@ private function getEntityIdsFromBatch(Select $batch): array
390
388
* Get product meta data
391
389
*
392
390
* @return EntityMetadataInterface
393
- * @throws Exception
391
+ * @throws \ Exception
394
392
*/
395
393
private function getProductMetaData (): EntityMetadataInterface
396
394
{
@@ -405,7 +403,7 @@ private function getProductMetaData(): EntityMetadataInterface
405
403
* Get replica table
406
404
*
407
405
* @return string
408
- * @throws Exception
406
+ * @throws \ Exception
409
407
*/
410
408
private function getReplicaTable (): string
411
409
{
@@ -418,6 +416,7 @@ private function getReplicaTable(): string
418
416
* Replacement of tables from replica to main
419
417
*
420
418
* @return void
419
+ * @throws \Zend_Db_Statement_Exception
421
420
*/
422
421
private function switchTables (): void
423
422
{
@@ -446,6 +445,7 @@ private function switchTables(): void
446
445
*
447
446
* @param array $dimensions
448
447
* @return void
448
+ * @throws \Zend_Db_Statement_Exception
449
449
*/
450
450
private function moveDataFromReplicaTableToReplicaTables (array $ dimensions ): void
451
451
{
0 commit comments