Skip to content

Commit bafd003

Browse files
authored
Merge pull request #157 from php-http/cs
update to newest cs fixer rules
2 parents fb1298f + e9a072b commit bafd003

31 files changed

+7
-123
lines changed

spec/Encoding/DechunkStreamSpec.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public function it_gets_content()
3636
$this->getContents()->shouldReturn('test');
3737
}
3838

39-
public function it_does_not_know_the_content_size()
40-
{
41-
$stream = new MemoryStream("4\r\ntest\r\n4\r\ntest\r\n0\r\n\r\n\0");
42-
$this->beConstructedWith($stream);
39+
public function it_does_not_know_the_content_size()
40+
{
41+
$stream = new MemoryStream("4\r\ntest\r\n4\r\ntest\r\n0\r\n\r\n\0");
42+
$this->beConstructedWith($stream);
4343

44-
$this->getSize()->shouldReturn(null);
45-
}
44+
$this->getSize()->shouldReturn(null);
45+
}
4646
}

src/Authentication/AutoBasicAuth.php

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public function __construct($shouldRremoveUserInfo = true)
2727
$this->shouldRemoveUserInfo = (bool) $shouldRremoveUserInfo;
2828
}
2929

30-
/**
31-
* {@inheritdoc}
32-
*/
3330
public function authenticate(RequestInterface $request)
3431
{
3532
$uri = $request->getUri();

src/Authentication/BasicAuth.php

-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ public function __construct($username, $password)
3232
$this->password = $password;
3333
}
3434

35-
/**
36-
* {@inheritdoc}
37-
*/
3835
public function authenticate(RequestInterface $request)
3936
{
4037
$header = sprintf('Basic %s', base64_encode(sprintf('%s:%s', $this->username, $this->password)));

src/Authentication/Bearer.php

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ public function __construct($token)
2525
$this->token = $token;
2626
}
2727

28-
/**
29-
* {@inheritdoc}
30-
*/
3128
public function authenticate(RequestInterface $request)
3229
{
3330
$header = sprintf('Bearer %s', $this->token);

src/Authentication/Chain.php

-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ public function __construct(array $authenticationChain = [])
3333
$this->authenticationChain = $authenticationChain;
3434
}
3535

36-
/**
37-
* {@inheritdoc}
38-
*/
3936
public function authenticate(RequestInterface $request)
4037
{
4138
foreach ($this->authenticationChain as $authentication) {

src/Authentication/Header.php

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public function __construct(string $name, $value)
2626
$this->value = $value;
2727
}
2828

29-
/**
30-
* {@inheritdoc}
31-
*/
3229
public function authenticate(RequestInterface $request)
3330
{
3431
return $request->withHeader($this->name, $this->value);

src/Authentication/Matching.php

-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ public function __construct(Authentication $authentication, callable $matcher =
3939
$this->matcher = new CallbackRequestMatcher($matcher);
4040
}
4141

42-
/**
43-
* {@inheritdoc}
44-
*/
4542
public function authenticate(RequestInterface $request)
4643
{
4744
if ($this->matcher->matches($request)) {

src/Authentication/QueryParam.php

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ public function __construct(array $params)
2525
$this->params = $params;
2626
}
2727

28-
/**
29-
* {@inheritdoc}
30-
*/
3128
public function authenticate(RequestInterface $request)
3229
{
3330
$uri = $request->getUri();

src/Authentication/RequestConditional.php

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ public function __construct(RequestMatcher $requestMatcher, Authentication $auth
2929
$this->authentication = $authentication;
3030
}
3131

32-
/**
33-
* {@inheritdoc}
34-
*/
3532
public function authenticate(RequestInterface $request)
3633
{
3734
if ($this->requestMatcher->matches($request)) {

src/Authentication/Wsse.php

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ public function __construct($username, $password, $hashAlgorithm = 'sha1')
4242
$this->hashAlgorithm = $hashAlgorithm;
4343
}
4444

45-
/**
46-
* {@inheritdoc}
47-
*/
4845
public function authenticate(RequestInterface $request)
4946
{
5047
$nonce = substr(md5(uniqid(uniqid().'_', true)), 0, 16);

src/CookieJar.php

-6
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,12 @@ public function clear()
192192
$this->cookies = new \SplObjectStorage();
193193
}
194194

195-
/**
196-
* {@inheritdoc}
197-
*/
198195
#[\ReturnTypeWillChange]
199196
public function count()
200197
{
201198
return $this->cookies->count();
202199
}
203200

204-
/**
205-
* {@inheritdoc}
206-
*/
207201
#[\ReturnTypeWillChange]
208202
public function getIterator()
209203
{

src/Encoding/DeflateStream.php

-6
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,11 @@ public function __construct(StreamInterface $stream, $level = -1)
2323
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15]);
2424
}
2525

26-
/**
27-
* {@inheritdoc}
28-
*/
2926
protected function readFilter(): string
3027
{
3128
return 'zlib.deflate';
3229
}
3330

34-
/**
35-
* {@inheritdoc}
36-
*/
3731
protected function writeFilter(): string
3832
{
3933
return 'zlib.inflate';

src/Encoding/FilteredStream.php

-3
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ protected function fill(): void
120120
}
121121
}
122122

123-
/**
124-
* {@inheritdoc}
125-
*/
126123
public function getContents(): string
127124
{
128125
$buffer = '';

src/Encoding/GzipDecodeStream.php

-6
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,11 @@ public function __construct(StreamInterface $stream, $level = -1)
2727
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31, 'level' => $level]);
2828
}
2929

30-
/**
31-
* {@inheritdoc}
32-
*/
3330
protected function readFilter(): string
3431
{
3532
return 'zlib.inflate';
3633
}
3734

38-
/**
39-
* {@inheritdoc}
40-
*/
4135
protected function writeFilter(): string
4236
{
4337
return 'zlib.deflate';

src/Encoding/GzipEncodeStream.php

-6
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,11 @@ public function __construct(StreamInterface $stream, $level = -1)
2727
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31]);
2828
}
2929

30-
/**
31-
* {@inheritdoc}
32-
*/
3330
protected function readFilter(): string
3431
{
3532
return 'zlib.deflate';
3633
}
3734

38-
/**
39-
* {@inheritdoc}
40-
*/
4135
protected function writeFilter(): string
4236
{
4337
return 'zlib.inflate';

src/Formatter/CurlCommandFormatter.php

-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
*/
1414
class CurlCommandFormatter implements Formatter
1515
{
16-
/**
17-
* {@inheritdoc}
18-
*/
1916
public function formatRequest(RequestInterface $request)
2017
{
2118
$command = sprintf('curl %s', escapeshellarg((string) $request->getUri()->withFragment('')));
@@ -60,9 +57,6 @@ public function formatRequest(RequestInterface $request)
6057
return $command;
6158
}
6259

63-
/**
64-
* {@inheritdoc}
65-
*/
6660
public function formatResponse(ResponseInterface $response)
6761
{
6862
return '';

src/Formatter/FullHttpMessageFormatter.php

-6
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ public function __construct($maxBodyLength = 1000, string $binaryDetectionRegex
3636
$this->binaryDetectionRegex = $binaryDetectionRegex;
3737
}
3838

39-
/**
40-
* {@inheritdoc}
41-
*/
4239
public function formatRequest(RequestInterface $request)
4340
{
4441
$message = sprintf(
@@ -55,9 +52,6 @@ public function formatRequest(RequestInterface $request)
5552
return $this->addBody($request, $message);
5653
}
5754

58-
/**
59-
* {@inheritdoc}
60-
*/
6155
public function formatResponse(ResponseInterface $response)
6256
{
6357
$message = sprintf(

src/Formatter/SimpleFormatter.php

-6
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
*/
1515
class SimpleFormatter implements Formatter
1616
{
17-
/**
18-
* {@inheritdoc}
19-
*/
2017
public function formatRequest(RequestInterface $request)
2118
{
2219
return sprintf(
@@ -27,9 +24,6 @@ public function formatRequest(RequestInterface $request)
2724
);
2825
}
2926

30-
/**
31-
* {@inheritdoc}
32-
*/
3327
public function formatResponse(ResponseInterface $response)
3428
{
3529
return sprintf(

src/MessageFactory/DiactorosMessageFactory.php

-6
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ public function __construct()
3232
$this->streamFactory = new DiactorosStreamFactory();
3333
}
3434

35-
/**
36-
* {@inheritdoc}
37-
*/
3835
public function createRequest(
3936
$method,
4037
$uri,
@@ -59,9 +56,6 @@ public function createRequest(
5956
))->withProtocolVersion($protocolVersion);
6057
}
6158

62-
/**
63-
* {@inheritdoc}
64-
*/
6559
public function createResponse(
6660
$statusCode = 200,
6761
$reasonPhrase = null,

src/MessageFactory/GuzzleMessageFactory.php

-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
final class GuzzleMessageFactory implements MessageFactory
2121
{
22-
/**
23-
* {@inheritdoc}
24-
*/
2522
public function createRequest(
2623
$method,
2724
$uri,
@@ -38,9 +35,6 @@ public function createRequest(
3835
);
3936
}
4037

41-
/**
42-
* {@inheritdoc}
43-
*/
4438
public function createResponse(
4539
$statusCode = 200,
4640
$reasonPhrase = null,

src/MessageFactory/SlimMessageFactory.php

-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ public function __construct()
3838
$this->uriFactory = new SlimUriFactory();
3939
}
4040

41-
/**
42-
* {@inheritdoc}
43-
*/
4441
public function createRequest(
4542
$method,
4643
$uri,
@@ -59,9 +56,6 @@ public function createRequest(
5956
))->withProtocolVersion($protocolVersion);
6057
}
6158

62-
/**
63-
* {@inheritdoc}
64-
*/
6559
public function createResponse(
6660
$statusCode = 200,
6761
$reasonPhrase = null,

src/RequestMatcher/CallbackRequestMatcher.php

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ public function __construct(callable $callback)
2222
$this->callback = $callback;
2323
}
2424

25-
/**
26-
* {@inheritdoc}
27-
*/
2825
public function matches(RequestInterface $request)
2926
{
3027
return (bool) call_user_func($this->callback, $request);

src/RequestMatcher/RegexRequestMatcher.php

-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ public function __construct($regex)
3131
$this->regex = $regex;
3232
}
3333

34-
/**
35-
* {@inheritdoc}
36-
*/
3734
public function matches(RequestInterface $request)
3835
{
3936
return (bool) preg_match($this->regex, (string) $request->getUri());

src/RequestMatcher/RequestMatcher.php

-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ public function __construct($path = null, $host = null, $methods = [], $schemes
5151
}
5252

5353
/**
54-
* {@inheritdoc}
55-
*
5654
* @api
5755
*/
5856
public function matches(RequestInterface $request)

src/Stream/BufferedStream.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function getContents(): string
209209
return $read;
210210
}
211211

212-
public function getMetadata(?string $key = null)
212+
public function getMetadata(string $key = null)
213213
{
214214
if (null === $this->resource) {
215215
if (null === $key) {

src/StreamFactory/DiactorosStreamFactory.php

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
*/
2121
final class DiactorosStreamFactory implements StreamFactory
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
2623
public function createStream($body = null)
2724
{
2825
if ($body instanceof StreamInterface) {

src/StreamFactory/GuzzleStreamFactory.php

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
final class GuzzleStreamFactory implements StreamFactory
2020
{
21-
/**
22-
* {@inheritdoc}
23-
*/
2421
public function createStream($body = null)
2522
{
2623
if (class_exists(Utils::class)) {

src/StreamFactory/SlimStreamFactory.php

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
final class SlimStreamFactory implements StreamFactory
2121
{
22-
/**
23-
* {@inheritdoc}
24-
*/
2522
public function createStream($body = null)
2623
{
2724
if ($body instanceof StreamInterface) {

src/UriFactory/DiactorosUriFactory.php

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
*/
2121
final class DiactorosUriFactory implements UriFactory
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
2623
public function createUri($uri)
2724
{
2825
if ($uri instanceof UriInterface) {

src/UriFactory/GuzzleUriFactory.php

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
*/
2121
final class GuzzleUriFactory implements UriFactory
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
2623
public function createUri($uri)
2724
{
2825
if (class_exists(Utils::class)) {

0 commit comments

Comments
 (0)