Skip to content

Commit 53125c0

Browse files
GrahamCampbellStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 8162210 commit 53125c0

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

src/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function workspaces(string $workspace)
205205
*
206206
* @return void
207207
*/
208-
public function authenticate(string $method, string $token, string $password = null)
208+
public function authenticate(string $method, string $token, string $password = null): void
209209
{
210210
$this->getHttpClientBuilder()->removePlugin(Authentication::class);
211211
$this->getHttpClientBuilder()->addPlugin(new Authentication($method, $token, $password));
@@ -218,7 +218,7 @@ public function authenticate(string $method, string $token, string $password = n
218218
*
219219
* @return void
220220
*/
221-
public function setUrl(string $url)
221+
public function setUrl(string $url): void
222222
{
223223
$this->httpClientBuilder->removePlugin(AddHostPlugin::class);
224224
$this->httpClientBuilder->addPlugin(new AddHostPlugin(Psr17FactoryDiscovery::findUrlFactory()->createUri($url)));

src/HttpClient/Builder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function getHttpClient()
126126
*
127127
* @return void
128128
*/
129-
public function addPlugin(Plugin $plugin)
129+
public function addPlugin(Plugin $plugin): void
130130
{
131131
$this->plugins[] = $plugin;
132132
$this->pluginClient = null;
@@ -139,7 +139,7 @@ public function addPlugin(Plugin $plugin)
139139
*
140140
* @return void
141141
*/
142-
public function removePlugin(string $fqcn)
142+
public function removePlugin(string $fqcn): void
143143
{
144144
foreach ($this->plugins as $idx => $plugin) {
145145
if ($plugin instanceof $fqcn) {
@@ -157,7 +157,7 @@ public function removePlugin(string $fqcn)
157157
*
158158
* @return void
159159
*/
160-
public function addCache(CacheItemPoolInterface $cachePool, array $config = [])
160+
public function addCache(CacheItemPoolInterface $cachePool, array $config = []): void
161161
{
162162
if (!isset($config['cache_key_generator'])) {
163163
$config['cache_key_generator'] = new HeaderCacheKeyGenerator(['Authorization', 'Cookie', 'Accept', 'Content-type']);
@@ -172,7 +172,7 @@ public function addCache(CacheItemPoolInterface $cachePool, array $config = [])
172172
*
173173
* @return void
174174
*/
175-
public function removeCache()
175+
public function removeCache(): void
176176
{
177177
$this->cachePlugin = null;
178178
$this->pluginClient = null;

src/HttpClient/Message/ResponseMediator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function getPagination(ResponseInterface $response)
7272
{
7373
try {
7474
/** @var array<string,string> */
75-
return \array_filter(self::getContent($response), [self::class, 'paginationFilter'], ARRAY_FILTER_USE_KEY);
75+
return \array_filter(self::getContent($response), [self::class, 'paginationFilter'], \ARRAY_FILTER_USE_KEY);
7676
} catch (RuntimeException $e) {
7777
return [];
7878
}

src/HttpClient/Plugin/History.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getLastResponse()
5353
*
5454
* @return void
5555
*/
56-
public function addSuccess(RequestInterface $request, ResponseInterface $response)
56+
public function addSuccess(RequestInterface $request, ResponseInterface $response): void
5757
{
5858
$this->lastResponse = $response;
5959
}
@@ -66,7 +66,7 @@ public function addSuccess(RequestInterface $request, ResponseInterface $respons
6666
*
6767
* @return void
6868
*/
69-
public function addFailure(RequestInterface $request, ClientExceptionInterface $exception)
69+
public function addFailure(RequestInterface $request, ClientExceptionInterface $exception): void
7070
{
7171
}
7272
}

src/HttpClient/Util/QueryStringBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public static function build(array $query)
3535
return '';
3636
}
3737

38-
return \sprintf('?%s', \http_build_query($query, '', '&', PHP_QUERY_RFC3986));
38+
return \sprintf('?%s', \http_build_query($query, '', '&', \PHP_QUERY_RFC3986));
3939
}
4040
}

src/ResultPager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function fetchPrevious()
190190
*
191191
* @return void
192192
*/
193-
private function postFetch()
193+
private function postFetch(): void
194194
{
195195
$response = $this->client->getLastResponse();
196196

tests/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
final class ClientTest extends TestCase
2424
{
25-
public function testCreateClient()
25+
public function testCreateClient(): void
2626
{
2727
$client = new Client();
2828

tests/IntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
final class IntegrationTest extends TestCase
2424
{
25-
public function testShowRepo()
25+
public function testShowRepo(): void
2626
{
2727
$client = new Client();
2828

@@ -36,7 +36,7 @@ public function testShowRepo()
3636
self::assertSame('{7dd600e6-0d9c-4801-b967-cb4cc17359ff}', $response['uuid']);
3737
}
3838

39-
public function testRepoNotFound()
39+
public function testRepoNotFound(): void
4040
{
4141
$client = new Client();
4242

tests/ProjectsTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
final class ProjectsTest extends TestCase
2828
{
29-
public function testProjectList()
29+
public function testProjectList(): void
3030
{
3131
$client = MockedClient::create(
3232
ProjectsListResponse::create()
@@ -41,7 +41,7 @@ public function testProjectList()
4141
self::assertCount(9, $response['values']);
4242
}
4343

44-
public function testProjectShow()
44+
public function testProjectShow(): void
4545
{
4646
$client = MockedClient::create(
4747
ProjectsShowResponse::create()
@@ -56,7 +56,7 @@ public function testProjectShow()
5656
self::assertCount(11, $response);
5757
}
5858

59-
public function testProjectCreate()
59+
public function testProjectCreate(): void
6060
{
6161
$client = MockedClient::create(
6262
ProjectsCreateResponse::create()
@@ -83,7 +83,7 @@ public function testProjectCreate()
8383
self::assertCount(11, $response);
8484
}
8585

86-
public function testProjectUpdate()
86+
public function testProjectUpdate(): void
8787
{
8888
$client = MockedClient::create(
8989
ProjectsUpdateResponse::create()
@@ -110,7 +110,7 @@ public function testProjectUpdate()
110110
self::assertCount(11, $response);
111111
}
112112

113-
public function testProjectRemove()
113+
public function testProjectRemove(): void
114114
{
115115
$client = MockedClient::create(
116116
ProjectsRemoveResponse::create()

tests/ResponseMediatorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
class ResponseMediatorTest extends TestCase
2626
{
27-
public function testGetContent()
27+
public function testGetContent(): void
2828
{
2929
$response = new Response(
3030
200,
@@ -35,7 +35,7 @@ public function testGetContent()
3535
$this->assertSame(['foo' => 'bar'], ResponseMediator::getContent($response));
3636
}
3737

38-
public function testGetContentNotJson()
38+
public function testGetContentNotJson(): void
3939
{
4040
$body = 'foobar';
4141
$response = new Response(
@@ -50,7 +50,7 @@ public function testGetContentNotJson()
5050
ResponseMediator::getContent($response);
5151
}
5252

53-
public function testGetContentInvalidJson()
53+
public function testGetContentInvalidJson(): void
5454
{
5555
$body = 'foobar';
5656
$response = new Response(
@@ -65,7 +65,7 @@ public function testGetContentInvalidJson()
6565
ResponseMediator::getContent($response);
6666
}
6767

68-
public function testGetErrrorMessageInvalidJson()
68+
public function testGetErrrorMessageInvalidJson(): void
6969
{
7070
$body = 'foobar';
7171
$response = new Response(

0 commit comments

Comments
 (0)