Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
Fix codestyle issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexions committed Jun 4, 2019
1 parent 0d93e21 commit df94c32
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/Klarna/Rest/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,26 +141,21 @@ public function fetch()
protected function request($method, $url, array $headers = [], $body = null)
{
switch ($method) {
case Method::GET: {
case Method::GET:
$response = $this->connector->get($url, $headers);
break;
}
case Method::POST: {
case Method::POST:
$response = $this->connector->post($url, $body, $headers);
break;
}
case Method::PUT: {
case Method::PUT:
$response = $this->connector->put($url, $body, $headers);
break;
}
case Method::DELETE: {
case Method::DELETE:
$response = $this->connector->delete($url, $body, $headers);
break;
}
case Method::PATCH: {
case Method::PATCH:
$response = $this->connector->patch($url, $body, $headers);
break;
}
default:
throw new \RuntimeException('Unknown request method' + $method);
}
Expand Down

0 comments on commit df94c32

Please sign in to comment.