@@ -37,8 +37,7 @@ |
||
| 37 | 37 | * @class Gender |
| 38 | 38 | * @package Platine\Framework\Enum |
| 39 | 39 | */ |
| 40 | -class Gender |
|
| 41 | -{ |
|
| 40 | +class Gender { |
|
| 42 | 41 | public const MALE = 'M'; |
| 43 | 42 | public const FEMALE = 'F'; |
| 44 | 43 | } |
@@ -178,10 +178,10 @@ |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | - * Create instance using database configuration |
|
| 182 | - * @param AppDatabaseConfig $cfg |
|
| 183 | - * @return $this |
|
| 184 | - */ |
|
| 181 | + * Create instance using database configuration |
|
| 182 | + * @param AppDatabaseConfig $cfg |
|
| 183 | + * @return $this |
|
| 184 | + */ |
|
| 185 | 185 | public function fromConfig(AppDatabaseConfig $cfg): self |
| 186 | 186 | { |
| 187 | 187 | return $this; |
@@ -62,8 +62,7 @@ discard block |
||
| 62 | 62 | * @package Platine\Framework\Form\Param |
| 63 | 63 | * @template TEntity as Entity |
| 64 | 64 | */ |
| 65 | -class BaseParam implements JsonSerializable |
|
| 66 | -{ |
|
| 65 | +class BaseParam implements JsonSerializable { |
|
| 67 | 66 | /** |
| 68 | 67 | * The list of fields to ignore |
| 69 | 68 | * @var array<string> |
@@ -74,8 +73,7 @@ discard block |
||
| 74 | 73 | * Create new instance |
| 75 | 74 | * @param array<string, mixed> $data |
| 76 | 75 | */ |
| 77 | - public function __construct(array $data = []) |
|
| 78 | - { |
|
| 76 | + public function __construct(array $data = []) { |
|
| 79 | 77 | // Load default values |
| 80 | 78 | $this->loadDefaultValues(); |
| 81 | 79 | |
@@ -187,11 +187,11 @@ |
||
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | $data = [ |
| 190 | - 'id' => $user->id, |
|
| 191 | - 'username' => $user->username, |
|
| 192 | - 'lastname' => $user->lastname, |
|
| 193 | - 'firstname' => $user->firstname, |
|
| 194 | - 'permissions' => array_unique($permissions), |
|
| 190 | + 'id' => $user->id, |
|
| 191 | + 'username' => $user->username, |
|
| 192 | + 'lastname' => $user->lastname, |
|
| 193 | + 'firstname' => $user->firstname, |
|
| 194 | + 'permissions' => array_unique($permissions), |
|
| 195 | 195 | ]; |
| 196 | 196 | |
| 197 | 197 | $loginData = array_merge($data, $this->getUserData($user)); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | /** |
| 109 | 109 | * {@inheritdoc} |
| 110 | 110 | */ |
| 111 | - public function getId(): int|string |
|
| 111 | + public function getId(): int | string |
|
| 112 | 112 | { |
| 113 | 113 | if ($this->isLogged() === false) { |
| 114 | 114 | throw new AccountNotFoundException('User not logged', 401); |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | /** |
| 122 | 122 | * {@inheritdoc} |
| 123 | 123 | */ |
| 124 | - public function getId(): int|string |
|
| 124 | + public function getId(): int | string |
|
| 125 | 125 | { |
| 126 | 126 | if ($this->isLogged() === false) { |
| 127 | 127 | throw new AccountNotFoundException('User not logged', 401); |
@@ -72,8 +72,7 @@ |
||
| 72 | 72 | * @package Platine\Framework\Auth\Authentication |
| 73 | 73 | * @template T |
| 74 | 74 | */ |
| 75 | -class JWTAuthentication implements AuthenticationInterface |
|
| 76 | -{ |
|
| 75 | +class JWTAuthentication implements AuthenticationInterface { |
|
| 77 | 76 | /** |
| 78 | 77 | * Create new instance |
| 79 | 78 | * @param JWT $jwt |
@@ -57,14 +57,12 @@ |
||
| 57 | 57 | * @package Platine\Framework\Auth\Repository |
| 58 | 58 | * @extends Repository<Permission> |
| 59 | 59 | */ |
| 60 | -class PermissionRepository extends Repository |
|
| 61 | -{ |
|
| 60 | +class PermissionRepository extends Repository { |
|
| 62 | 61 | /** |
| 63 | 62 | * Create new instance |
| 64 | 63 | * @param EntityManager<Permission> $manager |
| 65 | 64 | */ |
| 66 | - public function __construct(EntityManager $manager) |
|
| 67 | - { |
|
| 65 | + public function __construct(EntityManager $manager) { |
|
| 68 | 66 | parent::__construct($manager, Permission::class); |
| 69 | 67 | } |
| 70 | 68 | |
@@ -104,5 +104,5 @@ |
||
| 104 | 104 | * |
| 105 | 105 | * @throws AccountNotFoundException if can not find the account information |
| 106 | 106 | */ |
| 107 | - public function getId(): int|string; |
|
| 107 | + public function getId(): int | string; |
|
| 108 | 108 | } |
@@ -61,8 +61,7 @@ |
||
| 61 | 61 | * @package Platine\Framework\Auth\Middleware |
| 62 | 62 | * @template T |
| 63 | 63 | */ |
| 64 | -class ApiAuthenticationMiddleware implements MiddlewareInterface |
|
| 65 | -{ |
|
| 64 | +class ApiAuthenticationMiddleware implements MiddlewareInterface { |
|
| 66 | 65 | /** |
| 67 | 66 | * Create new instance |
| 68 | 67 | * @param AuthenticationInterface $authentication |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | * @class RestErrorHandler |
| 42 | 42 | * @package Platine\Framework\Handler\Error |
| 43 | 43 | */ |
| 44 | -class RestErrorHandler extends ErrorHandler |
|
| 45 | -{ |
|
| 44 | +class RestErrorHandler extends ErrorHandler { |
|
| 46 | 45 | /** |
| 47 | 46 | * {@inheritodc} |
| 48 | 47 | */ |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | * Return the validation max file size rules of attachment upload |
| 446 | 446 | * @return int|string |
| 447 | 447 | */ |
| 448 | - protected function getAttachmentMaxSize(): int|string |
|
| 448 | + protected function getAttachmentMaxSize(): int | string |
|
| 449 | 449 | { |
| 450 | 450 | return '2M'; |
| 451 | 451 | } |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | * Return the image max file size value |
| 455 | 455 | * @return int|string |
| 456 | 456 | */ |
| 457 | - protected function getImageMaxSize(): int|string |
|
| 457 | + protected function getImageMaxSize(): int | string |
|
| 458 | 458 | { |
| 459 | 459 | return '1M'; |
| 460 | 460 | } |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | * @package Platine\Framework\Helper |
| 53 | 53 | * @template T |
| 54 | 54 | */ |
| 55 | -class FileHelper |
|
| 56 | -{ |
|
| 55 | +class FileHelper { |
|
| 57 | 56 | /** |
| 58 | 57 | * |
| 59 | 58 | * @param Config<T> $config |