Skip to content

Commit 026d547

Browse files
committed
Fix coding standards on existing code
1 parent 97579b3 commit 026d547

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/PHPCouchDB/Server.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,26 @@
22

33
namespace PHPCouchDB;
44

5-
class Server {
5+
class Server
6+
{
67
protected $client;
78

8-
public function __construct(\GuzzleHttp\ClientInterface $client) {
9-
if($client) {
9+
public function __construct(\GuzzleHttp\ClientInterface $client)
10+
{
11+
if ($client) {
1012
$this->client = $client;
1113
} else {
1214
throw new Exception('$client is required');
1315
}
1416
}
1517

16-
public function getVersion() {
18+
public function getVersion()
19+
{
1720
$response = $this->client->request("GET", "/");
18-
if($response->getStatusCode() == 200) {
21+
if ($response->getStatusCode() == 200) {
1922
// try to decode JSON
20-
if($json_data = json_decode($response->getBody(), true)) {
21-
if($json_data['version']) {
23+
if ($json_data = json_decode($response->getBody(), true)) {
24+
if ($json_data['version']) {
2225
return $json_data['version'];
2326
} else {
2427
return "unknown";

0 commit comments

Comments
 (0)