Skip to content

Commit 9be67b6

Browse files
committed
Static test fix
1 parent 642570c commit 9be67b6

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

app/code/Magento/AsynchronousOperations/Model/OperationProcessor.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88

99
namespace Magento\AsynchronousOperations\Model;
1010

11-
use Magento\Framework\Serialize\Serializer\Json;
1211
use Magento\AsynchronousOperations\Api\Data\OperationInterface;
13-
use Magento\Framework\Bulk\OperationManagementInterface;
1412
use Magento\AsynchronousOperations\Model\ConfigInterface as AsyncConfig;
15-
use Magento\Framework\MessageQueue\MessageValidator;
16-
use Magento\Framework\MessageQueue\MessageEncoder;
17-
use Magento\Framework\Exception\NoSuchEntityException;
18-
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
19-
use Psr\Log\LoggerInterface;
20-
use Magento\Framework\Exception\LocalizedException;
13+
use Magento\Framework\Bulk\OperationManagementInterface;
14+
use Magento\Framework\Communication\ConfigInterface as CommunicationConfig;
2115
use Magento\Framework\DB\Adapter\ConnectionException;
2216
use Magento\Framework\DB\Adapter\DeadlockException;
2317
use Magento\Framework\DB\Adapter\LockWaitException;
18+
use Magento\Framework\Exception\LocalizedException;
19+
use Magento\Framework\Exception\NoSuchEntityException;
20+
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
21+
use Magento\Framework\MessageQueue\MessageEncoder;
22+
use Magento\Framework\MessageQueue\MessageValidator;
23+
use Magento\Framework\Serialize\Serializer\Json;
2424
use Magento\Framework\Webapi\ServiceOutputProcessor;
25-
use Magento\Framework\Communication\ConfigInterface as CommunicationConfig;
25+
use Psr\Log\LoggerInterface;
2626

2727
/**
28-
* Class OperationProcessor
28+
* Proccess operation
2929
*
3030
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3131
*/
@@ -136,7 +136,9 @@ public function process(string $encodedMessage)
136136
$result = $this->executeHandler($callback, $entityParams);
137137
$status = $result['status'];
138138
$errorCode = $result['error_code'];
139+
// phpcs:disable Magento2.Performance.ForeachArrayMerge
139140
$messages = array_merge($messages, $result['messages']);
141+
// phpcs:enable Magento2.Performance.ForeachArrayMerge
140142
$outputData = $result['output_data'];
141143
}
142144
}
@@ -186,7 +188,9 @@ private function executeHandler($callback, $entityParams)
186188
'output_data' => null
187189
];
188190
try {
191+
// phpcs:disable Magento2.Functions.DiscouragedFunction
189192
$result['output_data'] = call_user_func_array($callback, $entityParams);
193+
// phpcs:enable Magento2.Functions.DiscouragedFunction
190194
$result['messages'][] = sprintf('Service execution success %s::%s', get_class($callback[0]), $callback[1]);
191195
} catch (\Zend_Db_Adapter_Exception $e) {
192196
$this->logger->critical($e->getMessage());

0 commit comments

Comments
 (0)