@@ -87,7 +87,7 @@ |
||
87 | 87 | ?CsrfStorageInterface $storage = null |
88 | 88 | ) { |
89 | 89 | $this->config = $config; |
90 | - $this->storage = $storage ?? new CsrfNullStorage(); |
|
90 | + $this->storage = $storage ?? new CsrfNullStorage(); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @class CsrfManager |
58 | 58 | * @package Platine\Framework\Security\Csrf |
59 | 59 | */ |
60 | -class CsrfManager |
|
61 | -{ |
|
60 | +class CsrfManager { |
|
62 | 61 | /** |
63 | 62 | * The application configuration class |
64 | 63 | * @var Config |
@@ -179,8 +178,7 @@ discard block |
||
179 | 178 | * @param string $key |
180 | 179 | * @return mixed |
181 | 180 | */ |
182 | - private function getConfigValue(string $key) |
|
183 | - { |
|
181 | + private function getConfigValue(string $key) { |
|
184 | 182 | $config = $this->config->get('security.csrf', []); |
185 | 183 | |
186 | 184 | return $config[$key] ?? null; |
@@ -51,8 +51,7 @@ |
||
51 | 51 | * @class CsrfStorageInterface |
52 | 52 | * @package Platine\Framework\Security\Csrf |
53 | 53 | */ |
54 | -interface CsrfStorageInterface |
|
55 | -{ |
|
54 | +interface CsrfStorageInterface { |
|
56 | 55 | /** |
57 | 56 | * Return the token information from storage |
58 | 57 | * @param string $name |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class CsrfSessionStorage |
55 | 55 | * @package Platine\Framework\Security\Csrf\Storage |
56 | 56 | */ |
57 | -class CsrfSessionStorage implements CsrfStorageInterface |
|
58 | -{ |
|
57 | +class CsrfSessionStorage implements CsrfStorageInterface { |
|
59 | 58 | /** |
60 | 59 | * The session key used to store CSRF data |
61 | 60 | */ |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | * Create new instance |
73 | 72 | * @param Session $session |
74 | 73 | */ |
75 | - public function __construct(Session $session) |
|
76 | - { |
|
74 | + public function __construct(Session $session) { |
|
77 | 75 | $this->session = $session; |
78 | 76 | } |
79 | 77 |
@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | public function set(string $name, array $data): void |
76 | 76 | { |
77 | - $this->data[$name] = $data; |
|
77 | + $this->data[$name] = $data; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * @class CsrfNullStorage |
54 | 54 | * @package Platine\Framework\Security\Csrf\Storage |
55 | 55 | */ |
56 | -class CsrfNullStorage implements CsrfStorageInterface |
|
57 | -{ |
|
56 | +class CsrfNullStorage implements CsrfStorageInterface { |
|
58 | 57 | /** |
59 | 58 | * The CSRF data |
60 | 59 | * @var array<string, array<string, int|mixed> |