Skip to content

Commit

Permalink
Update docblocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 21, 2017
1 parent 596d38d commit 12fc9b1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Http/Middleware/CsrfProtectionMiddleware.php
Expand Up @@ -23,7 +23,7 @@
/**
* Provides CSRF protection & validation.
*
* This component adds a CSRF token to a cookie. The cookie value is compared to
* This middleware adds a CSRF token to a cookie. The cookie value is compared to
* request data, or the X-CSRF-Token header on each PATCH, POST,
* PUT, or DELETE request.
*
Expand Down Expand Up @@ -115,8 +115,8 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res
/**
* Checks if the request is POST, PUT, DELETE or PATCH and validates the CSRF token
*
* @param \Cake\Http\ServerRequest $request The request object.
* @return void
* @param \Psr\Http\Message\ServerRequestInterface $request The request object.
* @return \Psr\Http\Message\ServerRequestInterface
*/
protected function _validateAndUnsetTokenField(ServerRequestInterface $request)
{
Expand All @@ -138,8 +138,8 @@ protected function _validateAndUnsetTokenField(ServerRequestInterface $request)
* Also sets the request->params['_csrfToken'] so the newly minted
* token is available in the request data.
*
* @param \Cake\Http\ServerRequest $request The request object.
* @param \Cake\Http\Response $response The response object.
* @param \Psr\Http\Message\ServerRequestInterface $request The request object.
* @param \Psr\Http\Message\ResponseInterface $response The response object.
* @return void
*/
protected function _setToken(ServerRequestInterface &$request, ResponseInterface &$response)
Expand All @@ -163,9 +163,9 @@ protected function _setToken(ServerRequestInterface &$request, ResponseInterface
/**
* Validate the request data against the cookie token.
*
* @param \Cake\Http\ServerRequest $request The request to validate against.
* @throws \Cake\Network\Exception\InvalidCsrfTokenException when the CSRF token is invalid or missing.
* @param \Psr\Http\Message\ServerRequestInterface $request The request to validate against.
* @return void
* @throws \Cake\Network\Exception\InvalidCsrfTokenException When the CSRF token is invalid or missing.
*/
protected function _validateToken(ServerRequestInterface $request)
{
Expand Down

0 comments on commit 12fc9b1

Please sign in to comment.