Skip to content

Commit 79a1d86

Browse files
committed
TASK: Apply codestyle
1 parent 5c9417b commit 79a1d86

File tree

14 files changed

+6
-81
lines changed

14 files changed

+6
-81
lines changed

src/VCR/CodeTransform/CurlCodeTransform.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ class CurlCodeTransform extends AbstractCodeTransform
2929
'/(?<!::|->|\w_)\\\?curl_errno\s*\(/i' => '\VCR\LibraryHooks\CurlHook::curl_errno(',
3030
];
3131

32-
/**
33-
* {@inheritdoc}
34-
*/
3532
protected function transformCode(string $code): string
3633
{
3734
$transformedCode = preg_replace(array_keys(self::$patterns), array_values(self::$patterns), $code);

src/VCR/CodeTransform/SoapCodeTransform.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ class SoapCodeTransform extends AbstractCodeTransform
2626
'@extends\s+\\\?SoapClient\b@i',
2727
];
2828

29-
/**
30-
* {@inheritdoc}
31-
*/
3229
protected function transformCode(string $code): string
3330
{
3431
$transformedCode = preg_replace(self::$patterns, self::$replacements, $code);

src/VCR/LibraryHooks/CurlHook.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ public function __construct(
6060
) {
6161
}
6262

63-
/**
64-
* {@inheritdoc}
65-
*/
6663
public function enable(\Closure $requestCallback): void
6764
{
6865
if (self::ENABLED == static::$status) {
@@ -78,19 +75,13 @@ public function enable(\Closure $requestCallback): void
7875
static::$status = self::ENABLED;
7976
}
8077

81-
/**
82-
* {@inheritdoc}
83-
*/
8478
public function disable(): void
8579
{
8680
self::$requestCallback = null;
8781

8882
static::$status = self::DISABLED;
8983
}
9084

91-
/**
92-
* {@inheritdoc}
93-
*/
9485
public function isEnabled(): bool
9586
{
9687
return self::ENABLED == self::$status;
@@ -135,7 +126,7 @@ public static function __callStatic($method, array $args)
135126
/**
136127
* @see http://www.php.net/manual/en/function.curl-init.php
137128
*/
138-
public static function curlInit(?string $url = null): \CurlHandle|false
129+
public static function curlInit(string $url = null): \CurlHandle|false
139130
{
140131
$curlHandle = curl_init($url);
141132
if (false !== $curlHandle) {
@@ -271,8 +262,6 @@ public static function curlMultiGetcontent(\CurlHandle $curlHandle): ?string
271262
* Get information regarding a specific transfer.
272263
*
273264
* @see http://www.php.net/manual/en/function.curl-getinfo.php
274-
*
275-
* @return mixed
276265
*/
277266
public static function curlGetinfo(\CurlHandle $curlHandle, int $option = 0)
278267
{

src/VCR/LibraryHooks/SoapHook.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ public function doRequest(string $request, string $location, string $action, int
6767
return $response->getBody();
6868
}
6969

70-
/**
71-
* {@inheritdoc}
72-
*/
7370
public function enable(\Closure $requestCallback): void
7471
{
7572
self::$requestCallback = $requestCallback;
@@ -85,19 +82,13 @@ public function enable(\Closure $requestCallback): void
8582
$this->status = self::ENABLED;
8683
}
8784

88-
/**
89-
* {@inheritdoc}
90-
*/
9185
public function disable(): void
9286
{
9387
self::$requestCallback = null;
9488

9589
$this->status = self::DISABLED;
9690
}
9791

98-
/**
99-
* {@inheritdoc}
100-
*/
10192
public function isEnabled(): bool
10293
{
10394
return self::ENABLED == $this->status;

src/VCR/LibraryHooks/StreamWrapperHook.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ class StreamWrapperHook implements LibraryHook
2727
*/
2828
public $context;
2929

30-
/**
31-
* {@inheritdoc}
32-
*/
3330
public function enable(\Closure $requestCallback): void
3431
{
3532
self::$requestCallback = $requestCallback;
@@ -42,9 +39,6 @@ public function enable(\Closure $requestCallback): void
4239
$this->status = self::ENABLED;
4340
}
4441

45-
/**
46-
* {@inheritdoc}
47-
*/
4842
public function disable(): void
4943
{
5044
self::$requestCallback = null;
@@ -54,9 +48,6 @@ public function disable(): void
5448
$this->status = self::DISABLED;
5549
}
5650

57-
/**
58-
* {@inheritdoc}
59-
*/
6051
public function isEnabled(): bool
6152
{
6253
return self::ENABLED == $this->status;

src/VCR/Request.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ public function getCurlOptions(): array
217217
return $this->curlOptions;
218218
}
219219

220-
/**
221-
* @return mixed
222-
*/
223220
public function getCurlOption(int $key)
224221
{
225222
if (empty($this->curlOptions[$key])) {
@@ -278,17 +275,11 @@ public function removeHeader(string $key): void
278275
unset($this->headers[$key]);
279276
}
280277

281-
/**
282-
* @param mixed $value
283-
*/
284278
public function setPostField(string $key, $value): void
285279
{
286280
$this->postFields[$key] = $value;
287281
}
288282

289-
/**
290-
* @param mixed $value
291-
*/
292283
public function setCurlOption(int $key, $value): void
293284
{
294285
$this->curlOptions[$key] = $value;

src/VCR/Response.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,14 @@ class Response
2828
*/
2929
protected $curlInfo = [];
3030

31-
/**
32-
* @var mixed
33-
*/
3431
protected $httpVersion;
3532

3633
/**
3734
* @param string|array<string, string> $status
3835
* @param array<string,string> $headers
3936
* @param array<string,mixed> $curlInfo
4037
*/
41-
final public function __construct($status, array $headers = [], ?string $body = null, array $curlInfo = [])
38+
final public function __construct($status, array $headers = [], string $body = null, array $curlInfo = [])
4239
{
4340
$this->setStatus($status);
4441
$this->headers = $headers;
@@ -57,11 +54,9 @@ public function toArray(): array
5754
// Base64 encode when binary
5855
if (
5956
null !== $this->getContentType()
60-
&&
61-
(
57+
&& (
6258
str_contains($this->getContentType(), 'application/x-gzip')
63-
||
64-
'binary' == $this->getHeader('Content-Transfer-Encoding')
59+
|| 'binary' == $this->getHeader('Content-Transfer-Encoding')
6560
)
6661
) {
6762
$body = base64_encode($body);
@@ -118,7 +113,7 @@ public function getBody(): string
118113
/**
119114
* @return array<string,mixed>|mixed|null
120115
*/
121-
public function getCurlInfo(?string $option = null)
116+
public function getCurlInfo(string $option = null)
122117
{
123118
if (empty($option)) {
124119
return $this->curlInfo;
@@ -157,9 +152,6 @@ public function getHeader(string $key): ?string
157152
return $this->headers[$key];
158153
}
159154

160-
/**
161-
* @return mixed
162-
*/
163155
public function getHttpVersion()
164156
{
165157
return $this->httpVersion;

src/VCR/Storage/Blackhole.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@
99
*/
1010
class Blackhole implements Storage
1111
{
12-
/**
13-
* {@inheritdoc}
14-
*/
1512
public function storeRecording(array $recording): void
1613
{
1714
}
1815

19-
/**
20-
* {@inheritdoc}
21-
*/
2216
public function isNew(): bool
2317
{
2418
return true;

src/VCR/Storage/Json.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class Json extends AbstractStorage
1414
{
15-
/**
16-
* {@inheritdoc}
17-
*/
1815
public function storeRecording(array $recording): void
1916
{
2017
fseek($this->handle, -1, \SEEK_END);

src/VCR/Storage/Yaml.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public function __construct(string $cassettePath, string $cassetteName, Parser $
2727
$this->yamlDumper = $dumper ?: new Dumper();
2828
}
2929

30-
/**
31-
* {@inheritdoc}
32-
*/
3330
public function storeRecording(array $recording): void
3431
{
3532
fseek($this->handle, -1, \SEEK_END);

0 commit comments

Comments
 (0)