@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | * @class ApiUser |
54 | 54 | * @package Platine\Framework\Audit |
55 | 55 | */ |
56 | -class ApiUser implements AuditUserInterface |
|
57 | -{ |
|
56 | +class ApiUser implements AuditUserInterface { |
|
58 | 57 | /** |
59 | 58 | * The API Authentication instance |
60 | 59 | * @var ApiAuthenticationInterface |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | * Create new instance |
67 | 66 | * @param ApiAuthenticationInterface $authentication |
68 | 67 | */ |
69 | - public function __construct(ApiAuthenticationInterface $authentication) |
|
70 | - { |
|
68 | + public function __construct(ApiAuthenticationInterface $authentication) { |
|
71 | 69 | $this->authentication = $authentication; |
72 | 70 | } |
73 | 71 |
@@ -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 | /** |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @package Platine\Framework\Security\Csrf |
60 | 60 | * @template T |
61 | 61 | */ |
62 | -class CsrfManager |
|
63 | -{ |
|
62 | +class CsrfManager { |
|
64 | 63 | /** |
65 | 64 | * The application configuration class |
66 | 65 | * @var Config<T> |
@@ -188,8 +187,7 @@ discard block |
||
188 | 187 | * @param string $key |
189 | 188 | * @return mixed |
190 | 189 | */ |
191 | - private function getConfigValue(string $key) |
|
192 | - { |
|
190 | + private function getConfigValue(string $key) { |
|
193 | 191 | $config = $this->config->get('security.csrf', []); |
194 | 192 | |
195 | 193 | 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, string $token, int $expire): void |
76 | 76 | { |
77 | - $this->data[$name] = $token; |
|
77 | + $this->data[$name] = $token; |
|
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, string> |
@@ -51,8 +51,7 @@ |
||
51 | 51 | * @class CsrfUserSessionStorage |
52 | 52 | * @package Platine\Framework\Security\Csrf\Storage |
53 | 53 | */ |
54 | -class CsrfUserSessionStorage extends CsrfSessionStorage |
|
55 | -{ |
|
54 | +class CsrfUserSessionStorage extends CsrfSessionStorage { |
|
56 | 55 | /** |
57 | 56 | * {@inheritdoc} |
58 | 57 | */ |
@@ -59,14 +59,12 @@ discard block |
||
59 | 59 | * @package Platine\Framework\Form\Param |
60 | 60 | * @template TEntity as Entity |
61 | 61 | */ |
62 | -class BaseParam implements JsonSerializable |
|
63 | -{ |
|
62 | +class BaseParam implements JsonSerializable { |
|
64 | 63 | /** |
65 | 64 | * Create new instance |
66 | 65 | * @param array<string, mixed> $data |
67 | 66 | */ |
68 | - public function __construct(array $data = []) |
|
69 | - { |
|
67 | + public function __construct(array $data = []) { |
|
70 | 68 | // Load default values |
71 | 69 | $this->loadDefaultValues(); |
72 | 70 | |
@@ -126,8 +124,7 @@ discard block |
||
126 | 124 | * Convert parameter to JSON array |
127 | 125 | * @return array<string, mixed> |
128 | 126 | */ |
129 | - public function jsonSerialize() |
|
130 | - { |
|
127 | + public function jsonSerialize() { |
|
131 | 128 | return $this->data(); |
132 | 129 | } |
133 | 130 | |
@@ -136,8 +133,7 @@ discard block |
||
136 | 133 | * @param string $name |
137 | 134 | * @return mixed|null |
138 | 135 | */ |
139 | - public function __get($name) |
|
140 | - { |
|
136 | + public function __get($name) { |
|
141 | 137 | if (property_exists($this, $name)) { |
142 | 138 | return $this->{$name}; |
143 | 139 | } |
@@ -157,8 +153,7 @@ discard block |
||
157 | 153 | * @param mixed $value |
158 | 154 | * @return mixed |
159 | 155 | */ |
160 | - protected function getPropertyValue(string $attribute, $value) |
|
161 | - { |
|
156 | + protected function getPropertyValue(string $attribute, $value) { |
|
162 | 157 | $types = $this->getPropertyTypes(); |
163 | 158 | $property = $types[$attribute] ?? null; |
164 | 159 | if ($property === null) { |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | * @package Platine\Framework\Http\Maintenance\Driver |
56 | 56 | * @template T |
57 | 57 | */ |
58 | -class FileMaintenanceDriver implements MaintenanceDriverInterface |
|
59 | -{ |
|
58 | +class FileMaintenanceDriver implements MaintenanceDriverInterface { |
|
60 | 59 | /** |
61 | 60 | * The application configuration |
62 | 61 | * @var Config<T> |
@@ -74,8 +73,7 @@ discard block |
||
74 | 73 | * @param Config<T> $config |
75 | 74 | * @param Filesystem $filesystem |
76 | 75 | */ |
77 | - public function __construct(Config $config, Filesystem $filesystem) |
|
78 | - { |
|
76 | + public function __construct(Config $config, Filesystem $filesystem) { |
|
79 | 77 | $this->config = $config; |
80 | 78 | $this->filesystem = $filesystem; |
81 | 79 | } |
@@ -51,8 +51,7 @@ |
||
51 | 51 | * @class MaintenanceDriverInterface |
52 | 52 | * @package Platine\Framework\Http\Maintenance |
53 | 53 | */ |
54 | -interface MaintenanceDriverInterface |
|
55 | -{ |
|
54 | +interface MaintenanceDriverInterface { |
|
56 | 55 | /** |
57 | 56 | * Whether the maintenance is active or not |
58 | 57 | * @return bool |