Skip to content

Commit

Permalink
Applied fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkessler authored and StyleCIBot committed Nov 24, 2016
1 parent 6edf123 commit 91a2877
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Frankkessler\Salesforce\Client\BulkClient;
use Frankkessler\Salesforce\DataObjects\BinaryBatch;
use Frankkessler\Salesforce\Interfaces\BulkBatchProcessorInterface;
use Frankkessler\Salesforce\Responses\Bulk\BulkBatchResponse;
use Frankkessler\Salesforce\Responses\Bulk\BulkBatchResultResponse;
use Frankkessler\Salesforce\Responses\Bulk\BulkJobResponse;
Expand Down Expand Up @@ -46,7 +45,7 @@ public function runBatch($operation, $objectType, $data, $options = [])
'isBatchedResult' => false,
'concurrencyMode' => 'Parallel',
'Sforce-Enable-PKChunking' => false,
'batchProcessor' => null,
'batchProcessor' => null,
];

$options = array_replace($defaults, $options);
Expand Down Expand Up @@ -93,9 +92,9 @@ public function runBatch($operation, $objectType, $data, $options = [])
if (in_array($batch->state, ['Completed', 'Failed', 'Not Processed', 'NotProcessed'])) {
if (in_array($batch->state, ['Completed'])) {
$batchResult = $this->batchResult($job->id, $batch->id, $options['isBatchedResult'], null, $options['contentType']);
if(class_exists($options['batchProcessor']) && class_implements($options['batchProcessor'], '\Frankkessler\Salesforce\Interfaces\BulkBatchProcessorInterface')){
if (class_exists($options['batchProcessor']) && class_implements($options['batchProcessor'], '\Frankkessler\Salesforce\Interfaces\BulkBatchProcessorInterface')) {
call_user_func([$options['batchProcessor'], 'process'], $batchResult);
}else {
} else {
$batch->records = $batchResult->records;
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/BulkBatchProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public static function process(BulkBatchResultResponse $batchResult)
{
static::$records = array_merge(static::$records, $batchResult->records);
}
}
}
2 changes: 1 addition & 1 deletion tests/BulkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function testRunPkChunkQueryBatchWithBatchProcessor()

$this->assertEquals(2, count(BulkBatchProcessor::$records));

foreach(BulkBatchProcessor::$records as $record){
foreach (BulkBatchProcessor::$records as $record) {
$this->assertEquals($firstAccountId, $record['Id']);
break;
}
Expand Down

0 comments on commit 91a2877

Please sign in to comment.