Skip to content

Commit 0ec748c

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 303bcd3 + aee2c98 commit 0ec748c

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Progyny, Inc & Frank Kessler
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/Bulk.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Frankkessler\Salesforce\Client\BulkClient;
66
use Frankkessler\Salesforce\DataObjects\BinaryBatch;
7-
use Frankkessler\Salesforce\Interfaces\BulkBatchProcessorInterface;
87
use Frankkessler\Salesforce\Responses\Bulk\BulkBatchResponse;
98
use Frankkessler\Salesforce\Responses\Bulk\BulkBatchResultResponse;
109
use Frankkessler\Salesforce\Responses\Bulk\BulkJobResponse;
@@ -46,7 +45,7 @@ public function runBatch($operation, $objectType, $data, $options = [])
4645
'isBatchedResult' => false,
4746
'concurrencyMode' => 'Parallel',
4847
'Sforce-Enable-PKChunking' => false,
49-
'batchProcessor' => null,
48+
'batchProcessor' => null,
5049
];
5150

5251
$options = array_replace($defaults, $options);
@@ -93,9 +92,9 @@ public function runBatch($operation, $objectType, $data, $options = [])
9392
if (in_array($batch->state, ['Completed', 'Failed', 'Not Processed', 'NotProcessed'])) {
9493
if (in_array($batch->state, ['Completed'])) {
9594
$batchResult = $this->batchResult($job->id, $batch->id, $options['isBatchedResult'], null, $options['contentType']);
96-
if(class_exists($options['batchProcessor']) && class_implements($options['batchProcessor'], '\Frankkessler\Salesforce\Interfaces\BulkBatchProcessorInterface')){
95+
if (class_exists($options['batchProcessor']) && class_implements($options['batchProcessor'], '\Frankkessler\Salesforce\Interfaces\BulkBatchProcessorInterface')) {
9796
call_user_func([$options['batchProcessor'], 'process'], $batchResult);
98-
}else {
97+
} else {
9998
$batch->records = $batchResult->records;
10099
}
101100
}

tests/BulkBatchProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ public static function process(BulkBatchResultResponse $batchResult)
1111
{
1212
static::$records = array_merge(static::$records, $batchResult->records);
1313
}
14-
}
14+
}

tests/BulkTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public function testRunPkChunkQueryBatchWithBatchProcessor()
295295

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

298-
foreach(BulkBatchProcessor::$records as $record){
298+
foreach (BulkBatchProcessor::$records as $record) {
299299
$this->assertEquals($firstAccountId, $record['Id']);
300300
break;
301301
}

0 commit comments

Comments
 (0)