@@ -71,9 +71,9 @@ |
||
| 71 | 71 | $this->session = $session; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - /** |
|
| 75 | - * {@inheritdoc} |
|
| 76 | - */ |
|
| 74 | + /** |
|
| 75 | + * {@inheritdoc} |
|
| 76 | + */ |
|
| 77 | 77 | public function set(string $key, float $value, int $ttl): bool |
| 78 | 78 | { |
| 79 | 79 | $this->session->set($key, [ |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | * @class SessionStorage |
| 55 | 55 | * @package Platine\Framework\Http\RateLimit\Storage |
| 56 | 56 | */ |
| 57 | -class SessionStorage implements RateLimitStorageInterface |
|
| 58 | -{ |
|
| 57 | +class SessionStorage implements RateLimitStorageInterface { |
|
| 59 | 58 | /** |
| 60 | 59 | * The session instance |
| 61 | 60 | * @var Session |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | * Create new instance |
| 67 | 66 | * @param Session $session |
| 68 | 67 | */ |
| 69 | - public function __construct(Session $session) |
|
| 70 | - { |
|
| 68 | + public function __construct(Session $session) { |
|
| 71 | 69 | $this->session = $session; |
| 72 | 70 | } |
| 73 | 71 | |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class InMemoryStorage |
| 54 | 54 | * @package Platine\Framework\Http\RateLimit\Storage |
| 55 | 55 | */ |
| 56 | -class InMemoryStorage implements RateLimitStorageInterface |
|
| 57 | -{ |
|
| 56 | +class InMemoryStorage implements RateLimitStorageInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * The data store |
| 60 | 59 | * @var array<string, mixed> |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | class ApcuStorage implements RateLimitStorageInterface |
| 58 | 58 | { |
| 59 | - /** |
|
| 59 | + /** |
|
| 60 | 60 | * Create new instance |
| 61 | 61 | */ |
| 62 | 62 | public function __construct() |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * {@inheritdoc} |
|
| 72 | - */ |
|
| 70 | + /** |
|
| 71 | + * {@inheritdoc} |
|
| 72 | + */ |
|
| 73 | 73 | public function set(string $key, float $value, int $ttl): bool |
| 74 | 74 | { |
| 75 | 75 | return apcu_store($key, $value, $ttl); |
@@ -54,13 +54,11 @@ |
||
| 54 | 54 | * @class ApcuStorage |
| 55 | 55 | * @package Platine\Framework\Http\RateLimit\Storage |
| 56 | 56 | */ |
| 57 | -class ApcuStorage implements RateLimitStorageInterface |
|
| 58 | -{ |
|
| 57 | +class ApcuStorage implements RateLimitStorageInterface { |
|
| 59 | 58 | /** |
| 60 | 59 | * Create new instance |
| 61 | 60 | */ |
| 62 | - public function __construct() |
|
| 63 | - { |
|
| 61 | + public function __construct() { |
|
| 64 | 62 | if ((!extension_loaded('apcu')) || !((bool) ini_get('apc.enabled'))) { |
| 65 | 63 | throw new RuntimeException('The rate limit storage for APCu driver is not available.' |
| 66 | 64 | . ' Check if APCu extension is loaded and enabled.'); |
@@ -37,8 +37,7 @@ |
||
| 37 | 37 | * @class HttpTooManyRequestsException |
| 38 | 38 | * @package Platine\Framework\Http\Exception |
| 39 | 39 | */ |
| 40 | -class HttpTooManyRequestsException extends HttpSpecialException |
|
| 41 | -{ |
|
| 40 | +class HttpTooManyRequestsException extends HttpSpecialException { |
|
| 42 | 41 | /** |
| 43 | 42 | * |
| 44 | 43 | * @var int |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | * @package Platine\Framework\Config |
| 56 | 56 | * @template TDbConfigurationEntity as Entity |
| 57 | 57 | */ |
| 58 | -interface DatabaseConfigLoaderInterface |
|
| 59 | -{ |
|
| 58 | +interface DatabaseConfigLoaderInterface { |
|
| 60 | 59 | /** |
| 61 | 60 | * Load the configuration group for the given environment with custom filters |
| 62 | 61 | * @param string $environment the name of the environment |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | * @class UserStatus |
| 52 | 52 | * @package Platine\Framework\Auth\Enum |
| 53 | 53 | */ |
| 54 | -class UserStatus |
|
| 55 | -{ |
|
| 54 | +class UserStatus { |
|
| 56 | 55 | public const ACTIVE = 'A'; |
| 57 | 56 | public const LOCKED = 'D'; |
| 58 | 57 | } |