Skip to content

Commit

Permalink
Do PSR2 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ekasitk committed Sep 30, 2017
1 parent b4ffefb commit 15b8191
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/DataProcessing/v1/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,24 @@ public function createCluster(array $options = []): Cluster
return $this->model(Cluster::class)->create($options);
}

public function createMultipleClusters(array $options = [])
public function createMultipleClusters(array $options = [])
{
if (!array_key_exists("count", $options)) {
throw new \RuntimeException("Require 'count'");
throw new \RuntimeException("Require 'count'");
}

$response = $this->execute($this->api->postClusters(), $options);
# For multiple clusters, the current API returns only cluster IDs.
$ids = Utils::flattenJson(Utils::jsonDecode($response), 'clusters');
if ($response->getStatusCode() === 204 || empty($ids)) {
return;
}
}
foreach ($ids as $id) {
$cluster = $this->model(Cluster::class);
$cluster->id = $id;
yield $cluster;
}

}
}

public function scaleCluster(array $options = []): Cluster
{
Expand Down
1 change: 0 additions & 1 deletion src/OpenStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,4 @@ public function dataProcessingV1(array $options = []): \OpenStack\DataProcessing
$defaults = ['catalogName' => 'sahara', 'catalogType' => 'data-processing'];
return $this->builder->createService('DataProcessing\\v1', array_merge($defaults, $options));
}

}

0 comments on commit 15b8191

Please sign in to comment.