Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to newest cs fixer rules #157

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions spec/Encoding/DechunkStreamSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public function it_gets_content()
$this->getContents()->shouldReturn('test');
}

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

$this->getSize()->shouldReturn(null);
}
$this->getSize()->shouldReturn(null);
}
}
3 changes: 0 additions & 3 deletions src/Authentication/AutoBasicAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public function __construct($shouldRremoveUserInfo = true)
$this->shouldRemoveUserInfo = (bool) $shouldRremoveUserInfo;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
$uri = $request->getUri();
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/BasicAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ public function __construct($username, $password)
$this->password = $password;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
$header = sprintf('Basic %s', base64_encode(sprintf('%s:%s', $this->username, $this->password)));
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/Bearer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ public function __construct($token)
$this->token = $token;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
$header = sprintf('Bearer %s', $this->token);
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/Chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ public function __construct(array $authenticationChain = [])
$this->authenticationChain = $authenticationChain;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
foreach ($this->authenticationChain as $authentication) {
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ public function __construct(string $name, $value)
$this->value = $value;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
return $request->withHeader($this->name, $this->value);
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/Matching.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ public function __construct(Authentication $authentication, callable $matcher =
$this->matcher = new CallbackRequestMatcher($matcher);
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
if ($this->matcher->matches($request)) {
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/QueryParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ public function __construct(array $params)
$this->params = $params;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
$uri = $request->getUri();
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/RequestConditional.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public function __construct(RequestMatcher $requestMatcher, Authentication $auth
$this->authentication = $authentication;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
if ($this->requestMatcher->matches($request)) {
Expand Down
3 changes: 0 additions & 3 deletions src/Authentication/Wsse.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ public function __construct($username, $password, $hashAlgorithm = 'sha1')
$this->hashAlgorithm = $hashAlgorithm;
}

/**
* {@inheritdoc}
*/
public function authenticate(RequestInterface $request)
{
$nonce = substr(md5(uniqid(uniqid().'_', true)), 0, 16);
Expand Down
6 changes: 0 additions & 6 deletions src/CookieJar.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,12 @@ public function clear()
$this->cookies = new \SplObjectStorage();
}

/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function count()
{
return $this->cookies->count();
}

/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
Expand Down
6 changes: 0 additions & 6 deletions src/Encoding/DeflateStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,11 @@ public function __construct(StreamInterface $stream, $level = -1)
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15]);
}

/**
* {@inheritdoc}
*/
protected function readFilter(): string
{
return 'zlib.deflate';
}

/**
* {@inheritdoc}
*/
protected function writeFilter(): string
{
return 'zlib.inflate';
Expand Down
3 changes: 0 additions & 3 deletions src/Encoding/FilteredStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ protected function fill(): void
}
}

/**
* {@inheritdoc}
*/
public function getContents(): string
{
$buffer = '';
Expand Down
6 changes: 0 additions & 6 deletions src/Encoding/GzipDecodeStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,11 @@ public function __construct(StreamInterface $stream, $level = -1)
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31, 'level' => $level]);
}

/**
* {@inheritdoc}
*/
protected function readFilter(): string
{
return 'zlib.inflate';
}

/**
* {@inheritdoc}
*/
protected function writeFilter(): string
{
return 'zlib.deflate';
Expand Down
6 changes: 0 additions & 6 deletions src/Encoding/GzipEncodeStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,11 @@ public function __construct(StreamInterface $stream, $level = -1)
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31]);
}

/**
* {@inheritdoc}
*/
protected function readFilter(): string
{
return 'zlib.deflate';
}

/**
* {@inheritdoc}
*/
protected function writeFilter(): string
{
return 'zlib.inflate';
Expand Down
6 changes: 0 additions & 6 deletions src/Formatter/CurlCommandFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
*/
class CurlCommandFormatter implements Formatter
{
/**
* {@inheritdoc}
*/
public function formatRequest(RequestInterface $request)
{
$command = sprintf('curl %s', escapeshellarg((string) $request->getUri()->withFragment('')));
Expand Down Expand Up @@ -60,9 +57,6 @@ public function formatRequest(RequestInterface $request)
return $command;
}

/**
* {@inheritdoc}
*/
public function formatResponse(ResponseInterface $response)
{
return '';
Expand Down
6 changes: 0 additions & 6 deletions src/Formatter/FullHttpMessageFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ public function __construct($maxBodyLength = 1000, string $binaryDetectionRegex
$this->binaryDetectionRegex = $binaryDetectionRegex;
}

/**
* {@inheritdoc}
*/
public function formatRequest(RequestInterface $request)
{
$message = sprintf(
Expand All @@ -55,9 +52,6 @@ public function formatRequest(RequestInterface $request)
return $this->addBody($request, $message);
}

/**
* {@inheritdoc}
*/
public function formatResponse(ResponseInterface $response)
{
$message = sprintf(
Expand Down
6 changes: 0 additions & 6 deletions src/Formatter/SimpleFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
*/
class SimpleFormatter implements Formatter
{
/**
* {@inheritdoc}
*/
public function formatRequest(RequestInterface $request)
{
return sprintf(
Expand All @@ -27,9 +24,6 @@ public function formatRequest(RequestInterface $request)
);
}

/**
* {@inheritdoc}
*/
public function formatResponse(ResponseInterface $response)
{
return sprintf(
Expand Down
6 changes: 0 additions & 6 deletions src/MessageFactory/DiactorosMessageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ public function __construct()
$this->streamFactory = new DiactorosStreamFactory();
}

/**
* {@inheritdoc}
*/
public function createRequest(
$method,
$uri,
Expand All @@ -59,9 +56,6 @@ public function createRequest(
))->withProtocolVersion($protocolVersion);
}

/**
* {@inheritdoc}
*/
public function createResponse(
$statusCode = 200,
$reasonPhrase = null,
Expand Down
6 changes: 0 additions & 6 deletions src/MessageFactory/GuzzleMessageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
*/
final class GuzzleMessageFactory implements MessageFactory
{
/**
* {@inheritdoc}
*/
public function createRequest(
$method,
$uri,
Expand All @@ -38,9 +35,6 @@ public function createRequest(
);
}

/**
* {@inheritdoc}
*/
public function createResponse(
$statusCode = 200,
$reasonPhrase = null,
Expand Down
6 changes: 0 additions & 6 deletions src/MessageFactory/SlimMessageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public function __construct()
$this->uriFactory = new SlimUriFactory();
}

/**
* {@inheritdoc}
*/
public function createRequest(
$method,
$uri,
Expand All @@ -59,9 +56,6 @@ public function createRequest(
))->withProtocolVersion($protocolVersion);
}

/**
* {@inheritdoc}
*/
public function createResponse(
$statusCode = 200,
$reasonPhrase = null,
Expand Down
3 changes: 0 additions & 3 deletions src/RequestMatcher/CallbackRequestMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ public function __construct(callable $callback)
$this->callback = $callback;
}

/**
* {@inheritdoc}
*/
public function matches(RequestInterface $request)
{
return (bool) call_user_func($this->callback, $request);
Expand Down
3 changes: 0 additions & 3 deletions src/RequestMatcher/RegexRequestMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ public function __construct($regex)
$this->regex = $regex;
}

/**
* {@inheritdoc}
*/
public function matches(RequestInterface $request)
{
return (bool) preg_match($this->regex, (string) $request->getUri());
Expand Down
2 changes: 0 additions & 2 deletions src/RequestMatcher/RequestMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public function __construct($path = null, $host = null, $methods = [], $schemes
}

/**
* {@inheritdoc}
*
* @api
*/
public function matches(RequestInterface $request)
Expand Down
2 changes: 1 addition & 1 deletion src/Stream/BufferedStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function getContents(): string
return $read;
}

public function getMetadata(?string $key = null)
public function getMetadata(string $key = null)
{
if (null === $this->resource) {
if (null === $key) {
Expand Down
3 changes: 0 additions & 3 deletions src/StreamFactory/DiactorosStreamFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
final class DiactorosStreamFactory implements StreamFactory
{
/**
* {@inheritdoc}
*/
public function createStream($body = null)
{
if ($body instanceof StreamInterface) {
Expand Down
3 changes: 0 additions & 3 deletions src/StreamFactory/GuzzleStreamFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
*/
final class GuzzleStreamFactory implements StreamFactory
{
/**
* {@inheritdoc}
*/
public function createStream($body = null)
{
if (class_exists(Utils::class)) {
Expand Down
3 changes: 0 additions & 3 deletions src/StreamFactory/SlimStreamFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
*/
final class SlimStreamFactory implements StreamFactory
{
/**
* {@inheritdoc}
*/
public function createStream($body = null)
{
if ($body instanceof StreamInterface) {
Expand Down
3 changes: 0 additions & 3 deletions src/UriFactory/DiactorosUriFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
final class DiactorosUriFactory implements UriFactory
{
/**
* {@inheritdoc}
*/
public function createUri($uri)
{
if ($uri instanceof UriInterface) {
Expand Down
3 changes: 0 additions & 3 deletions src/UriFactory/GuzzleUriFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
final class GuzzleUriFactory implements UriFactory
{
/**
* {@inheritdoc}
*/
public function createUri($uri)
{
if (class_exists(Utils::class)) {
Expand Down
Loading