Nyholm / psr7

A super lightweight PSR-7 implementation
MIT License
1.16k stars 75 forks source link

Typo in readme #113

Closed odan closed 5 years ago

odan commented 5 years ago

There is a small typo in this example code:

$response = (new Psr17Factory())->createReponse('200', 'Hello world');

It should be:

$response = (new Psr17Factory())->createResponse(200, 'Hello world');

Or even better to emit a real Hello World text:

$response = (new Psr17Factory())->createResponse(200);
$response->getBody()->write('Hello World');
(new SapiEmitter())->emit($response);
Zegnat commented 5 years ago

Thanks for noticing! I have now made a PR (#114) addressing this. Please comment there if you have more ideas for how to clean-up that specific usage example.