diff --git a/src/Exception/CsrfException.php b/src/Exception/CsrfException.php index 0839efa..c171780 100644 --- a/src/Exception/CsrfException.php +++ b/src/Exception/CsrfException.php @@ -10,6 +10,10 @@ public function __construct( int $code = 403, Exception $previous = null ) { - parent::__construct($message, $code, $previous); + parent::__construct( + $message, + $code, + $previous + ); } } \ No newline at end of file diff --git a/src/Exception/CsrfTokenInvalidException.php b/src/Exception/CsrfTokenInvalidException.php index dfd4f61..5985c95 100644 --- a/src/Exception/CsrfTokenInvalidException.php +++ b/src/Exception/CsrfTokenInvalidException.php @@ -3,6 +3,8 @@ class CsrfTokenInvalidException extends CsrfException { public function __construct(string $tokenReceived) { - parent::__construct("CSRF Token '$tokenReceived' does not exist"); + parent::__construct( + "CSRF Token '$tokenReceived' does not exist" + ); } } \ No newline at end of file diff --git a/src/TokenStore.php b/src/TokenStore.php index 941f1dd..8684970 100644 --- a/src/TokenStore.php +++ b/src/TokenStore.php @@ -33,7 +33,10 @@ public function __construct(int $maxTokens = null) { } // TODO: Remove error_reporting when issue #45 is addressed. - $oldReportingLevel = error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); + $oldReportingLevel = error_reporting( + E_ALL & ~E_NOTICE & ~E_DEPRECATED + ); + $factory = new RandomLibFactory(); $this->tokenGenerator = $factory->getGenerator( new Strength($this->strength) @@ -61,7 +64,9 @@ public function setTokenLength(int $newTokenLength):void { * @see TokenStore::saveToken() for storing a generated token. */ public function generateNewToken():string { - return $this->tokenGenerator->generateString($this->tokenLength); + return $this->tokenGenerator->generateString( + $this->tokenLength + ); } /**