Skip to content

Commit e34f942

Browse files
wouterjnicolas-grekas
authored andcommitted
[Components] Convert to native return types
1 parent a1cb48b commit e34f942

File tree

7 files changed

+7
-27
lines changed

7 files changed

+7
-27
lines changed

CachingHttpClient.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@ public function stream(ResponseInterface|iterable $responses, float $timeout = n
136136
})());
137137
}
138138

139-
/**
140-
* @return void
141-
*/
142-
public function reset()
139+
public function reset(): void
143140
{
144141
if ($this->client instanceof ResetInterface) {
145142
$this->client->reset();

Chunk/ErrorChunk.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ public function __sleep(): array
9898
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
9999
}
100100

101-
/**
102-
* @return void
103-
*/
104-
public function __wakeup()
101+
public function __wakeup(): void
105102
{
106103
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
107104
}

DecoratorTrait.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ public function withOptions(array $options): static
4848
return $clone;
4949
}
5050

51-
/**
52-
* @return void
53-
*/
54-
public function reset()
51+
public function reset(): void
5552
{
5653
if ($this->client instanceof ResetInterface) {
5754
$this->client->reset();

HttpClientTrait.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,10 +675,8 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
675675
* Removes dot-segments from a path.
676676
*
677677
* @see https://tools.ietf.org/html/rfc3986#section-5.2.4
678-
*
679-
* @return string
680678
*/
681-
private static function removeDotSegments(string $path)
679+
private static function removeDotSegments(string $path): string
682680
{
683681
$result = '';
684682

MockHttpClient.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ public function withOptions(array $options): static
106106
return $clone;
107107
}
108108

109-
/**
110-
* @return void
111-
*/
112-
public function reset()
109+
public function reset(): void
113110
{
114111
$this->requestsCount = 0;
115112
}

Response/CommonResponseTrait.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ public function __sleep(): array
122122
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
123123
}
124124

125-
/**
126-
* @return void
127-
*/
128-
public function __wakeup()
125+
public function __wakeup(): void
129126
{
130127
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
131128
}

ScopingHttpClient.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ public function stream(ResponseInterface|iterable $responses, float $timeout = n
9393
return $this->client->stream($responses, $timeout);
9494
}
9595

96-
/**
97-
* @return void
98-
*/
99-
public function reset()
96+
public function reset(): void
10097
{
10198
if ($this->client instanceof ResetInterface) {
10299
$this->client->reset();

0 commit comments

Comments
 (0)