Skip to content

Commit

Permalink
Address code quality issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Riimu committed Mar 15, 2015
1 parent e50646e commit f70a7ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/CSRFHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function setStorage(Storage\TokenStorage $storage)
*/
public function setSources(array $sources)
{
$this->sources = array_map(function(Source\TokenSource $source) {
$this->sources = array_map(function (Source\TokenSource $source) {
return $source;
}, $sources);
}
Expand Down Expand Up @@ -157,9 +157,9 @@ public function validateRequest($throw = false)
if (!$this->validateRequestToken()) {
if ($throw) {
throw new InvalidCSRFTokenException('Invalid CSRF token');
} else {
$this->killScript();
}

$this->killScript();
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion src/NonceValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function getToken()
{
$token = parent::getToken();

// For usability's sake, allow the same token in the unlikely event that it gets recreated
// For the sake of usability, allow the same token in the unlikely event that it gets recreated
if (isset($_SESSION[$this->name][$this->extractKey($token)])) {
unset($_SESSION[$this->name][$this->extractKey($token)]);
}
Expand Down

0 comments on commit f70a7ab

Please sign in to comment.