Skip to content

Commit 4959f98

Browse files
committed
PSR2 Fixes
1 parent 517b860 commit 4959f98

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/Common/Api/OperatorTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
use GuzzleHttp\Promise\PromiseInterface;
1010
use OpenStack\Common\Resource\ResourceInterface;
1111
use OpenStack\Common\Transport\RequestSerializer;
12-
use Psr\Http\Message\ResponseInterface;
1312
use OpenStack\Common\Transport\Utils;
13+
use Psr\Http\Message\ResponseInterface;
1414

1515
trait OperatorTrait
1616
{
@@ -111,6 +111,7 @@ protected function sendRequest(Operation $operation, array $userValues = [], boo
111111
$method = $async ? 'requestAsync' : 'request';
112112

113113
$uri = Utils::uri_template($operation->getPath(), $userValues);
114+
114115
return $this->client->$method($operation->getMethod(), $uri, $options);
115116
}
116117

src/Common/Transport/HandlerStack.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99

1010
class HandlerStack extends GuzzleStack
1111
{
12-
1312
public static function create(?callable $handler = null): GuzzleStack
1413
{
15-
1614
$stack = new self($handler ?: Utils::chooseHandler());
1715
$stack->push(Middleware::httpErrors(), 'http_errors');
1816
$stack->push(Middleware::prepareBody(), 'prepare_body');

src/Common/Transport/Utils.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace OpenStack\Common\Transport;
66

77
use function GuzzleHttp\Psr7\uri_for;
8+
use GuzzleHttp\UriTemplate\UriTemplate;
89
use Psr\Http\Message\ResponseInterface;
910
use Psr\Http\Message\UriInterface;
10-
use GuzzleHttp\UriTemplate\UriTemplate;
1111

1212
class Utils
1313
{
@@ -82,13 +82,11 @@ public static function appendPath(UriInterface $uri, $path): UriInterface
8282
return uri_for(rtrim((string) $uri, '/').'/'.$path);
8383
}
8484

85-
/**
86-
* Expands a URI template
85+
/**
86+
* Expands a URI template.
8787
*
8888
* @param string $template URI template
8989
* @param array $variables Template variables
90-
*
91-
* @return string
9290
*/
9391
public static function uri_template($template, array $variables): string
9492
{
@@ -97,6 +95,7 @@ public static function uri_template($template, array $variables): string
9795
return \uri_template($template, $variables);
9896
// @codeCoverageIgnoreEnd
9997
}
98+
10099
return UriTemplate::expand($template, $variables);
101100
}
102101
}

src/Metric/v1/Gnocchi/Models/Resource.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public function getMetricMeasures(array $options = []): array
131131
);
132132

133133
$response = $this->execute($this->api->getResourceMetricMeasures(), $options);
134+
134135
return \GuzzleHttp\json_decode((string) $response->getBody());
135136
}
136137

0 commit comments

Comments
 (0)