diff --git a/.gitignore b/.gitignore index 114f726..1dca191 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .phpunit.result.cache composer.lock vendor -.php_cs.cache \ No newline at end of file +.php_cs.cache diff --git a/.php_cs.dist b/.php_cs.dist index 1e2e5d2..de2c466 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -24,4 +24,4 @@ return PhpCsFixer\Config::create() PhpCsFixer\Finder::create() ->in(__DIR__.'/src') ) -; \ No newline at end of file +; diff --git a/examples/arguments.php b/examples/arguments.php index a13ae4b..404c60d 100644 --- a/examples/arguments.php +++ b/examples/arguments.php @@ -14,4 +14,4 @@ 'body' => json_encode(['data' => 'value']) ]); -echo buffer($response->body()); // Emits the response \ No newline at end of file +echo buffer($response->body()); // Emits the response diff --git a/examples/buffered.php b/examples/buffered.php index 2951674..0050e6e 100644 --- a/examples/buffered.php +++ b/examples/buffered.php @@ -7,4 +7,4 @@ $response = fetch('https://mnavarro.dev'); -echo buffer($response->body()); \ No newline at end of file +echo buffer($response->body()); diff --git a/examples/class.php b/examples/class.php index e7993a5..fbafd57 100644 --- a/examples/class.php +++ b/examples/class.php @@ -75,4 +75,4 @@ public function deleteOrder(string $id): void { ($this->client)('DELETE', '/orders/'.$id); } -} \ No newline at end of file +} diff --git a/examples/composition.php b/examples/composition.php index d14df02..a747fa8 100644 --- a/examples/composition.php +++ b/examples/composition.php @@ -27,4 +27,4 @@ $client = $authenticated('your-api-token'); $ordersArray = $client('GET', '/orders'); -$createdOrderArray = $client('POST', '/orders', ['id' => '1234556']); \ No newline at end of file +$createdOrderArray = $client('POST', '/orders', ['id' => '1234556']); diff --git a/examples/headers.php b/examples/headers.php index cecbee5..91e880b 100644 --- a/examples/headers.php +++ b/examples/headers.php @@ -9,4 +9,4 @@ $stdHeaders = StandardHeaders::from($response); $lastModified = $stdHeaders->getLastModified()->diff(new DateTimeImmutable(), true)->h; -echo sprintf('This html content was last modified %s hours ago...', $lastModified) . PHP_EOL; \ No newline at end of file +echo sprintf('This html content was last modified %s hours ago...', $lastModified) . PHP_EOL; diff --git a/examples/info.php b/examples/info.php index 67faa42..1e36af9 100644 --- a/examples/info.php +++ b/examples/info.php @@ -12,4 +12,4 @@ echo $response->headers()->has('content-type'); // true echo $response->headers()->contains('content-type', 'html'); // true echo $response->headers()->get('content-type'); // text/html;charset=utf-8 -echo $response->body()->read(); // Outputs some bytes from the response body \ No newline at end of file +echo $response->body()->read(); // Outputs some bytes from the response body diff --git a/examples/json.php b/examples/json.php index 43cf55a..a801218 100644 --- a/examples/json.php +++ b/examples/json.php @@ -15,4 +15,4 @@ if ($body instanceof JsonDecoder) { var_dump($body->decode()); // Dumps the json as an array -} \ No newline at end of file +} diff --git a/examples/simple.php b/examples/simple.php index 85fa9c9..c70d95c 100644 --- a/examples/simple.php +++ b/examples/simple.php @@ -8,4 +8,4 @@ while (($chunk = $response->body()->read()) !== null) { echo $chunk; -} \ No newline at end of file +} diff --git a/psalm.xml.dist b/psalm.xml.dist index 3a2f39b..7da42dd 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -51,4 +51,4 @@ - \ No newline at end of file + diff --git a/tests/FetchFunctionalTest.php b/tests/FetchFunctionalTest.php index 266f0a9..81117a9 100644 --- a/tests/FetchFunctionalTest.php +++ b/tests/FetchFunctionalTest.php @@ -21,7 +21,7 @@ public function testItFetchesRootHtml(): void self::assertSame('OK', $response->status()->reasonPhrase()); self::assertTrue($response->headers()->contains('Content-Type', 'text/html')); self::assertTrue($response->headers()->has('etag')); - self::assertSame('354', $response->headers()->get('Content-Length')); + self::assertSame('355', $response->headers()->get('Content-Length')); $html = file_get_contents(__DIR__ . '/static/index.html'); self::assertSame($html, buffer($response->body())); } @@ -98,4 +98,4 @@ public function testProtocolErrorContainsAResponse(): void self::assertTrue($response->status()->isCode(404)); } } -} \ No newline at end of file +} diff --git a/tests/static/index.html b/tests/static/index.html index ca6d1c2..99597d0 100644 --- a/tests/static/index.html +++ b/tests/static/index.html @@ -16,4 +16,4 @@

Hello World!

- \ No newline at end of file + diff --git a/tests/static/user.json b/tests/static/user.json index 456eff5..60203dd 100644 --- a/tests/static/user.json +++ b/tests/static/user.json @@ -2,4 +2,4 @@ "id": "d1129f05-45e3-47ba-be0e-cffba7fdf9f6", "name": "John Doe", "email": "jdoe@example.com" -} \ No newline at end of file +}