Skip to content

Commit

Permalink
Add EOF (end of file) for some files
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k authored and mnavarrocarter committed Apr 12, 2021
1 parent 8ac319c commit 2b6530c
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.phpunit.result.cache
composer.lock
vendor
.php_cs.cache
.php_cs.cache
2 changes: 1 addition & 1 deletion .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ return PhpCsFixer\Config::create()
PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
)
;
;
2 changes: 1 addition & 1 deletion examples/arguments.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
'body' => json_encode(['data' => 'value'])
]);

echo buffer($response->body()); // Emits the response
echo buffer($response->body()); // Emits the response
2 changes: 1 addition & 1 deletion examples/buffered.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

$response = fetch('https://mnavarro.dev');

echo buffer($response->body());
echo buffer($response->body());
2 changes: 1 addition & 1 deletion examples/class.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ public function deleteOrder(string $id): void
{
($this->client)('DELETE', '/orders/'.$id);
}
}
}
2 changes: 1 addition & 1 deletion examples/composition.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
$client = $authenticated('your-api-token');

$ordersArray = $client('GET', '/orders');
$createdOrderArray = $client('POST', '/orders', ['id' => '1234556']);
$createdOrderArray = $client('POST', '/orders', ['id' => '1234556']);
2 changes: 1 addition & 1 deletion examples/headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
echo sprintf('This html content was last modified %s hours ago...', $lastModified) . PHP_EOL;
2 changes: 1 addition & 1 deletion examples/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
echo $response->body()->read(); // Outputs some bytes from the response body
2 changes: 1 addition & 1 deletion examples/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@

if ($body instanceof JsonDecoder) {
var_dump($body->decode()); // Dumps the json as an array
}
}
2 changes: 1 addition & 1 deletion examples/simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

while (($chunk = $response->body()->read()) !== null) {
echo $chunk;
}
}
2 changes: 1 addition & 1 deletion psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@

<InvalidStringClass errorLevel="info" />
</issueHandlers>
</psalm>
</psalm>
4 changes: 2 additions & 2 deletions tests/FetchFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down Expand Up @@ -98,4 +98,4 @@ public function testProtocolErrorContainsAResponse(): void
self::assertTrue($response->status()->isCode(404));
}
}
}
}
2 changes: 1 addition & 1 deletion tests/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
<h1>Hello World!</h1>
<script src="js/scripts.js"></script>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion tests/static/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"id": "d1129f05-45e3-47ba-be0e-cffba7fdf9f6",
"name": "John Doe",
"email": "[email protected]"
}
}

0 comments on commit 2b6530c

Please sign in to comment.