Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Oct 25, 2019
1 parent 7d264d3 commit 698f50a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The domain service layer then returns data that the Controller injects into a Vi
A view might be HTML for a standard web request; or,
it might be something like JSON for a RESTful API request.

This application uses `Single Action Controllers` which means: One action per class.
This application uses `Single Action Controllers` which means: **One action per class**.

A action method signature (with all parameters) should look like this:

Expand Down Expand Up @@ -48,7 +48,7 @@ final class ExampleAction
$this->responseFactory = $responseFactory;
}

public function __invoke(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
public function __invoke(ServerRequestInterface $request): ResponseInterface
{
$response = $this->responseFactory->createResponse();
$response->getBody()->write('Hello, World!');
Expand Down

0 comments on commit 698f50a

Please sign in to comment.