@@ -97,6 +97,7 @@ public function __construct(
97
97
* @return $this
98
98
* @throws \Exception if metadataPool doesn't contain metadata for ProductInterface
99
99
* @throws \DomainException
100
+ * @SuppressWarnings(PHPMD.CyclomaticComplexity)
100
101
*/
101
102
public function execute (array $ entityIds = [], $ useTempTable = false )
102
103
{
@@ -105,7 +106,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
105
106
$ this ->limitationByProducts = $ idsToBeReIndexed ;
106
107
$ this ->useTempTable = $ useTempTable ;
107
108
$ indexer = $ this ->indexerRegistry ->get (CategoryProductIndexer::INDEXER_ID );
108
- $ workingState = $ this ->getWorkingState ();
109
+ $ workingState = $ this ->isWorkingState ();
109
110
110
111
if (!$ indexer ->isScheduled ()
111
112
|| ($ indexer ->isScheduled () && !$ useTempTable )
@@ -123,7 +124,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
123
124
$ this ->reindex ();
124
125
125
126
// get actual state
126
- $ workingState = $ this ->getWorkingState ();
127
+ $ workingState = $ this ->isWorkingState ();
127
128
128
129
if ($ useTempTable && !$ workingState && $ indexer ->isScheduled ()) {
129
130
foreach ($ this ->storeManager ->getStores () as $ store ) {
@@ -159,7 +160,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
159
160
*
160
161
* @return bool
161
162
*/
162
- private function getWorkingState () : bool
163
+ private function isWorkingState () : bool
163
164
{
164
165
$ indexer = $ this ->indexerRegistry ->get (CategoryProductIndexer::INDEXER_ID );
165
166
$ sharedIndexer = $ this ->indexerRegistry ->get (ProductCategoryIndexer::INDEXER_ID );
0 commit comments