Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit e8469de

Browse files
author
Thibault
committed
Apply fixes from StyleCI
1 parent 2cf6ccb commit e8469de

6 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/Exceptions/RequestException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
class RequestException extends Exception
88
{
9-
//
9+
//
1010
}

src/RestClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ public function request($method, $url, array $data = [])
5050
if ($this->curl->error) {
5151
throw new TaigaException(static::getErrorMessage($this->curl));
5252
}
53+
5354
return $this->curl->response;
5455
}
5556

5657
protected static function getErrorMessage(Curl $curl)
5758
{
58-
return sprintf('Error %s - %s: %s',
59-
$curl->errorCode,
60-
$curl->effectiveUrl,
59+
return sprintf('Error %s - %s: %s',
60+
$curl->errorCode,
61+
$curl->effectiveUrl,
6162
$curl->errorMessage
6263
);
6364
}

src/Service.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public function __construct(RestClient $taiga, $prefix)
2424
$this->prefix = $prefix;
2525
}
2626

27-
public function __call($method, $arguments)
27+
public function __call($method, $arguments)
2828
{
2929
$method = strtoupper($method);
3030

31-
if(!in_array($method, static::$ALLOWED_HTTP_METHODS)) {
32-
throw new RequestException(sprintf("The HTTP method '%s' is not allowed. The only allowed methods are %s.",
31+
if (!in_array($method, static::$ALLOWED_HTTP_METHODS)) {
32+
throw new RequestException(sprintf("The HTTP method '%s' is not allowed. The only allowed methods are %s.",
3333
$name,
3434
implode(', ', static::$ALLOWED_HTTP_METHODS)
3535
));
@@ -40,7 +40,7 @@ public function __call($method, $arguments)
4040
$data = isset($arguments[2]) ? $arguments[2] : [];
4141

4242
return $this->taiga->request(
43-
$method,
43+
$method,
4444
sprintf('%s%s?%s', $this->prefix, $url, http_build_query($params), $data)
4545
);
4646
}

src/Services/Projects.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
class Projects extends Service
99
{
10-
1110
public function __construct(RestClient $taiga)
1211
{
1312
parent::__construct($taiga, 'projects');

src/Services/Severities.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
class Severities extends Service
99
{
10-
1110
public function __construct(RestClient $taiga)
1211
{
1312
parent::__construct($taiga, 'severities');

src/Taiga.php

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

55
use Curl\Curl;
66
use TZK\Taiga\Exceptions\TaigaException;
7-
use TZK\Taiga\Service;
87

98
class Taiga extends RestClient
109
{
@@ -22,7 +21,7 @@ public function __construct($baseUrl, $token, $language = 'en')
2221

2322
if (class_exists($class)) {
2423
$instance = new $class($this);
25-
if($instance instanceof Service) {
24+
if ($instance instanceof Service) {
2625
$this->services[lcfirst($basename)] = $instance;
2726
}
2827
}
@@ -46,6 +45,7 @@ public static function getAuthToken($baseUrl, array $credentials)
4645
if ($curl->error) {
4746
throw new TaigaException(static::getErrorMessage($curl));
4847
}
48+
4949
return $curl->response->auth_token;
5050
}
5151

0 commit comments

Comments
 (0)