From b8fe5c627e87193b941ceb479fea00997131862e Mon Sep 17 00:00:00 2001 From: Thomas Hills Date: Mon, 30 Oct 2023 10:26:46 +0000 Subject: [PATCH] Changed line seperators in Request to \n instead of \r\n --- tests/Unit/Request.php | 270 ++++++++++++++++++++--------------------- 1 file changed, 135 insertions(+), 135 deletions(-) diff --git a/tests/Unit/Request.php b/tests/Unit/Request.php index c7b408e..96f01b3 100644 --- a/tests/Unit/Request.php +++ b/tests/Unit/Request.php @@ -1,135 +1,135 @@ - $value) { - $this->headers[strtolower($key)] = [$value]; - } - } - - /** - * @return string[][] - */ - public function getHeaders(): array - { - return $this->headers; - } - - /** - * @return bool - */ - public function hasHeader($name): bool - { - foreach ($this->headers as $key => $value) { - if ($key === strtolower($name)) { - return true; - } - } - - return false; - } - - /** - * @return string[] - */ - public function getHeader($name): array - { - foreach ($this->headers as $key => $value) { - if ($key === strtolower($name)) { - return $value; - } - } - - return []; - } - - public function withHeader($name, $value): \Psr\Http\Message\MessageInterface - { - $this->headers[strtolower($name)] = [$value]; - return $this; - } - - // These functions are required by the interface but no used during - // parsing of headers - // - // phpcs:disable - public function withAddedHeader($name, $value): \Psr\Http\Message\MessageInterface - { - throw new LogicException('not implemented'); - } - - public function getProtocolVersion(): string - { - throw new LogicException('not implemented'); - } - - public function withProtocolVersion($version): \Psr\Http\Message\MessageInterface - { - throw new LogicException('not implemented'); - } - - public function getHeaderLine($name): string - { - throw new LogicException('not implemented'); - } - - public function withoutHeader($name): \Psr\Http\Message\MessageInterface - { - throw new LogicException('not implemented'); - } - - public function getBody(): StreamInterface - { - throw new LogicException('not implemented'); - } - - public function withBody(StreamInterface $body): \Psr\Http\Message\MessageInterface - { - throw new LogicException('not implemented'); - } - - public function getRequestTarget(): string - { - throw new LogicException('not implemented'); - } - - public function withRequestTarget($requestTarget): RequestInterface - { - throw new LogicException('not implemented'); - } - - public function getMethod(): string - { - throw new LogicException('not implemented'); - } - - public function withMethod($method): RequestInterface - { - throw new LogicException('not implemented'); - } - - public function getUri(): UriInterface - { - throw new LogicException('not implemented'); - } - - public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface - { - throw new LogicException('not implemented'); - } - // phpcs:enable -} + $value) { + $this->headers[strtolower($key)] = [$value]; + } + } + + /** + * @return string[][] + */ + public function getHeaders(): array + { + return $this->headers; + } + + /** + * @return bool + */ + public function hasHeader($name): bool + { + foreach ($this->headers as $key => $value) { + if ($key === strtolower($name)) { + return true; + } + } + + return false; + } + + /** + * @return string[] + */ + public function getHeader($name): array + { + foreach ($this->headers as $key => $value) { + if ($key === strtolower($name)) { + return $value; + } + } + + return []; + } + + public function withHeader($name, $value): \Psr\Http\Message\MessageInterface + { + $this->headers[strtolower($name)] = [$value]; + return $this; + } + + // These functions are required by the interface but no used during + // parsing of headers + // + // phpcs:disable + public function withAddedHeader($name, $value): \Psr\Http\Message\MessageInterface + { + throw new LogicException('not implemented'); + } + + public function getProtocolVersion(): string + { + throw new LogicException('not implemented'); + } + + public function withProtocolVersion($version): \Psr\Http\Message\MessageInterface + { + throw new LogicException('not implemented'); + } + + public function getHeaderLine($name): string + { + throw new LogicException('not implemented'); + } + + public function withoutHeader($name): \Psr\Http\Message\MessageInterface + { + throw new LogicException('not implemented'); + } + + public function getBody(): StreamInterface + { + throw new LogicException('not implemented'); + } + + public function withBody(StreamInterface $body): \Psr\Http\Message\MessageInterface + { + throw new LogicException('not implemented'); + } + + public function getRequestTarget(): string + { + throw new LogicException('not implemented'); + } + + public function withRequestTarget($requestTarget): RequestInterface + { + throw new LogicException('not implemented'); + } + + public function getMethod(): string + { + throw new LogicException('not implemented'); + } + + public function withMethod($method): RequestInterface + { + throw new LogicException('not implemented'); + } + + public function getUri(): UriInterface + { + throw new LogicException('not implemented'); + } + + public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface + { + throw new LogicException('not implemented'); + } + // phpcs:enable +}