Test Setup Failed
Push — master ( 6620a8...6443ba )
by
unknown
05:26
created
Tests/Unit/Async/SendImportErrorNotificationMessageProcessorTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
                         'file' => 'file' ,
108 108
                         'error' => 'error test',
109 109
                         'userId' => 1,
110
-                       ]))
110
+                        ]))
111 111
         ;
112 112
         $result = $processor->process($message, $this->createSessionMock());
113 113
         $this->assertEquals(MessageProcessorInterface::REJECT, $result);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function testSendImportNotificationProcessShouldReturnSubscribedTopics()
37 37
     {
38
-        $expectedSubscribedTopics = [Topics::SEND_IMPORT_ERROR_NOTIFICATION,];
38
+        $expectedSubscribedTopics = [Topics::SEND_IMPORT_ERROR_NOTIFICATION, ];
39 39
         $this->assertEquals(
40 40
             $expectedSubscribedTopics,
41 41
             SendImportErrorNotificationMessageProcessor::getSubscribedTopics()
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             ->expects($this->once())
105 105
             ->method('getBody')
106 106
             ->willReturn(json_encode([
107
-                        'file' => 'file' ,
107
+                        'file' => 'file',
108 108
                         'error' => 'error test',
109 109
                         'userId' => 1,
110 110
                        ]))
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             ->expects($this->once())
183 183
             ->method('getBody')
184 184
             ->willReturn(json_encode([
185
-                        'file' => 'import.csv' ,
185
+                        'file' => 'import.csv',
186 186
                         'error' => 'error import',
187 187
                         'userId' => 1,
188 188
                     ]));
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             ->expects($this->once())
244 244
             ->method('getBody')
245 245
             ->willReturn(json_encode([
246
-                        'file' => 'import.csv' ,
246
+                        'file' => 'import.csv',
247 247
                         'error' => 'error import',
248 248
                         'notifyEmail' => '[email protected]',
249 249
                     ]));
Please login to merge, or discard this patch.
Tests/Unit/Async/Export/PreExportMessageProcessorAbstractTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     public function uniqueJobResultProvider()
83 83
     {
84 84
         return [
85
-            [ true, PreExportMessageProcessorAbstract::ACK ],
86
-            [ false, PreExportMessageProcessorAbstract::REJECT ],
85
+            [true, PreExportMessageProcessorAbstract::ACK],
86
+            [false, PreExportMessageProcessorAbstract::REJECT],
87 87
         ];
88 88
     }
89 89
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             ->expects($this->once())
165 165
             ->method('runUnique')
166 166
             ->with($this->equalTo($message->getMessageId()), $this->equalTo($jobUniqueName))
167
-            ->will($this->returnCallback(function ($jobId, $name, $callback) use ($jobRunner, $childJob) {
167
+            ->will($this->returnCallback(function($jobId, $name, $callback) use ($jobRunner, $childJob) {
168 168
                 return $callback($jobRunner, $childJob);
169 169
             }))
170 170
         ;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $jobRunner
173 173
             ->expects($this->once())
174 174
             ->method('createDelayed')
175
-            ->with($jobUniqueName.'.chunk.1')
175
+            ->with($jobUniqueName . '.chunk.1')
176 176
         ;
177 177
 
178 178
         $tokenStorage = $this->createTokenStorageMock();
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             ->expects($this->once())
286 286
             ->method('runUnique')
287 287
             ->with($this->equalTo($message->getMessageId()), $this->equalTo($jobUniqueName))
288
-            ->will($this->returnCallback(function ($jobId, $name, $callback) use ($jobRunner, $childJob) {
288
+            ->will($this->returnCallback(function($jobId, $name, $callback) use ($jobRunner, $childJob) {
289 289
                 return $callback($jobRunner, $childJob);
290 290
             }))
291 291
         ;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         $jobRunner
294 294
             ->expects($this->once())
295 295
             ->method('createDelayed')
296
-            ->with($jobUniqueName.'.chunk.1')
296
+            ->with($jobUniqueName . '.chunk.1')
297 297
         ;
298 298
 
299 299
         $token = $this->createTokenMock();
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
             ->expects($this->once())
390 390
             ->method('runUnique')
391 391
             ->with($this->equalTo($message->getMessageId()), $this->equalTo($jobUniqueName))
392
-            ->will($this->returnCallback(function ($jobId, $name, $callback) use ($jobRunner, $childJob) {
392
+            ->will($this->returnCallback(function($jobId, $name, $callback) use ($jobRunner, $childJob) {
393 393
                 return $callback($jobRunner, $childJob);
394 394
             }))
395 395
         ;
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
         $jobRunner
398 398
             ->expects($this->once())
399 399
             ->method('createDelayed')
400
-            ->with($jobUniqueName.'.chunk.1')
400
+            ->with($jobUniqueName . '.chunk.1')
401 401
         ;
402 402
 
403 403
         $user = $this->createUserStub();
@@ -504,19 +504,19 @@  discard block
 block discarded – undo
504 504
             ->expects($this->once())
505 505
             ->method('runUnique')
506 506
             ->with($this->equalTo($message->getMessageId()), $this->equalTo($jobUniqueName))
507
-            ->will($this->returnCallback(function ($jobId, $name, $callback) use ($jobRunner, $childJob) {
507
+            ->will($this->returnCallback(function($jobId, $name, $callback) use ($jobRunner, $childJob) {
508 508
                 return $callback($jobRunner, $childJob);
509 509
             }))
510 510
         ;
511 511
         $jobRunner
512 512
             ->expects($this->at(0))
513 513
             ->method('createDelayed')
514
-            ->with($jobUniqueName.'.chunk.1')
514
+            ->with($jobUniqueName . '.chunk.1')
515 515
         ;
516 516
         $jobRunner
517 517
             ->expects($this->at(1))
518 518
             ->method('createDelayed')
519
-            ->with($jobUniqueName.'.chunk.2')
519
+            ->with($jobUniqueName . '.chunk.2')
520 520
         ;
521 521
 
522 522
         $user = $this->createUserStub();
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
      */
711 711
     private function getAnonymousFunction()
712 712
     {
713
-        return function () {
713
+        return function() {
714 714
         };
715 715
     }
716 716
 }
Please login to merge, or discard this patch.
src/Oro/Bundle/ImportExportBundle/Handler/AbstractImportHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $reader = $this->getJobReader($jobName, $processorType);
50 50
 
51
-        if (! $reader instanceof AbstractFileReader) {
51
+        if (!$reader instanceof AbstractFileReader) {
52 52
             throw new LogicException('Reader must be instance of AbstractFileReader');
53 53
         }
54 54
         $this->batchFileManager->setReader($reader);
@@ -167,13 +167,13 @@  discard block
 block discarded – undo
167 167
             $counts['process'] = 0;
168 168
             $counts['read'] = $context->getReadCount();
169 169
             $counts['process'] += $counts['add'] = $context->getAddCount();
170
-            $counts['process'] += $counts['replace'] =  $context->getReplaceCount();
170
+            $counts['process'] += $counts['replace'] = $context->getReplaceCount();
171 171
             $counts['process'] += $counts['update'] = $context->getUpdateCount();
172 172
             $counts['process'] += $counts['delete'] = $context->getDeleteCount();
173 173
             $counts['error_entries'] = $context->getErrorEntriesCount();
174 174
             $counts['errors'] += count($context->getErrors());
175 175
             // for cases when data wasn't imported
176
-            if (! $jobResult->isSuccessful()) {
176
+            if (!$jobResult->isSuccessful()) {
177 177
                 $counts['add'] = $counts['replace'] = $counts['update'] = $counts['delete'] = 0;
178 178
             }
179 179
             return $counts;
Please login to merge, or discard this patch.
src/Oro/Bundle/ImportExportBundle/Handler/ExportHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function getExportingEntityIds($jobName, $processorType, $processorAlias, $options)
173 173
     {
174
-        if (! ($reader = $this->getJobReader($jobName, $processorType)) instanceof BatchIdsReaderInterface) {
174
+        if (!($reader = $this->getJobReader($jobName, $processorType)) instanceof BatchIdsReaderInterface) {
175 175
             return [];
176 176
         }
177 177
 
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
         $fileName = FileManager::generateFileName($processorType, $outputFormat);
200 200
         $localFilePath = FileManager::generateTmpFilePath($fileName);
201 201
 
202
-        if (! ($writer = $this->writerChain->getWriter($outputFormat)) instanceof FileStreamWriter) {
202
+        if (!($writer = $this->writerChain->getWriter($outputFormat)) instanceof FileStreamWriter) {
203 203
             throw new LogicException('Writer must be instance of FileStreamWriter');
204 204
         }
205
-        if (! ($reader = $this->readerChain->getReader($outputFormat)) instanceof AbstractFileReader) {
205
+        if (!($reader = $this->readerChain->getReader($outputFormat)) instanceof AbstractFileReader) {
206 206
             throw new LogicException('Reader must be instance of AbstractFileReader');
207 207
         }
208 208
         $this->batchFileManager->setWriter($writer);
Please login to merge, or discard this patch.
src/Oro/Bundle/ImportExportBundle/Reader/CsvFileReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
         $data = $this->getFile()->fgetcsv();
50 50
         if (false !== $data) {
51
-            if (! $context instanceof ContextInterface) {
51
+            if (!$context instanceof ContextInterface) {
52 52
                 $context = $this->getContext();
53 53
             }
54 54
             $context->incrementReadOffset();
Please login to merge, or discard this patch.
src/Oro/Bundle/ImportExportBundle/Controller/ImportExportController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@
 block discarded – undo
463 463
             $jobExecutor->getJobFailureExceptions($jobCode),
464 464
             $jobExecutor->getJobErrors($jobCode)
465 465
         );
466
-        $content     = implode("\r\n", $errors);
466
+        $content = implode("\r\n", $errors);
467 467
 
468 468
         return new Response($content, 200, ['Content-Type' => 'text/x-log']);
469 469
     }
Please login to merge, or discard this patch.
src/Oro/Bundle/ImportExportBundle/Context/Context.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
     public function getFailureExceptions()
111 111
     {
112 112
         return array_map(
113
-            function ($e) {
113
+            function($e) {
114 114
                 return $e['message'];
115 115
             },
116 116
             $this->failureExceptions
Please login to merge, or discard this patch.
Bundle/ImportExportBundle/Async/Import/PreHttpImportMessageProcessor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected function validateMessageBody($body)
33 33
     {
34
-        if (! isset(
34
+        if (!isset(
35 35
             $body['userId'],
36 36
             $body['jobName'],
37 37
             $body['process'],
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
         $result = $this->jobRunner->runUnique(
70 70
             $parentMessageId,
71 71
             $jobName,
72
-            function (JobRunner $jobRunner, Job $job) use ($jobName, $body, $files) {
72
+            function(JobRunner $jobRunner, Job $job) use ($jobName, $body, $files) {
73 73
                 foreach ($files as $key => $file) {
74 74
                     $jobRunner->createDelayed(
75 75
                         sprintf('%s:chunk.%s', $jobName, ++$key),
76
-                        function (JobRunner $jobRunner, Job $child) use ($body, $file, $key) {
76
+                        function(JobRunner $jobRunner, Job $child) use ($body, $file, $key) {
77 77
                             $body['fileName'] = $file;
78 78
                             $body['options']['batch_number'] = $key;
79 79
                             $this->producer->send(
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             ->getRepository(User::class)
130 130
             ->find($body['userId']);
131 131
 
132
-        if (! $user instanceof User) {
132
+        if (!$user instanceof User) {
133 133
             $this->logger->critical(
134 134
                 sprintf('User not found. Id: %s', $body['userId'])
135 135
             );
Please login to merge, or discard this patch.
ImportExportBundle/Async/Import/PreImportMessageProcessorAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
 
176 176
         $body = $this->validateMessageBody($body);
177 177
 
178
-        if (! $body) {
178
+        if (!$body) {
179 179
             return self::REJECT;
180 180
         }
181 181
 
Please login to merge, or discard this patch.