Skip to content

Commit

Permalink
IT-10656 Used null coalescing operator as it's supporter from PHP 7.0…
Browse files Browse the repository at this point in the history
… and inline with PHP version in composer.json
  • Loading branch information
gecbla committed May 31, 2023
1 parent 6da5aa7 commit 05df487
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Arbor/Api/Gateway/RestGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,7 @@ public function bulkCreate(string $resource, Collection $collection, bool $check
}

if (isset($exception)) {
if (!isset($responseRepresentation['results'])) {
$responseRepresentation['results'] = [];
}

$failedResponses = array_reduce($responseRepresentation['results'], static function ($responses, $item) {
$failedResponses = array_reduce($responseRepresentation['results'] ?? [], static function ($responses, $item) {
if (isset($item['status']) && $item['status']['success'] === false) {
$responses[] = $item['status'];
}
Expand Down

0 comments on commit 05df487

Please sign in to comment.