@@ -55,14 +55,12 @@ |
||
55 | 55 | * @package Platine\Framework\Migration |
56 | 56 | * @extends Repository<MigrationEntity> |
57 | 57 | */ |
58 | -class MigrationRepository extends Repository |
|
59 | -{ |
|
58 | +class MigrationRepository extends Repository { |
|
60 | 59 | /** |
61 | 60 | * Create new instance |
62 | 61 | * @param EntityManager<MigrationEntity> $manager |
63 | 62 | */ |
64 | - public function __construct(EntityManager $manager) |
|
65 | - { |
|
63 | + public function __construct(EntityManager $manager) { |
|
66 | 64 | parent::__construct($manager, MigrationEntity::class); |
67 | 65 | } |
68 | 66 | } |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * @package Platine\Framework\Migration |
57 | 57 | * @extends Entity<MigrationEntity> |
58 | 58 | */ |
59 | -class MigrationEntity extends Entity |
|
60 | -{ |
|
59 | +class MigrationEntity extends Entity { |
|
61 | 60 | /** |
62 | 61 | * |
63 | 62 | * @param EntityMapperInterface<MigrationEntity> $mapper |
@@ -55,14 +55,12 @@ |
||
55 | 55 | * @package Platine\Framework\Audit\Model |
56 | 56 | * @extends Repository<Audit> |
57 | 57 | */ |
58 | -class AuditRepository extends Repository |
|
59 | -{ |
|
58 | +class AuditRepository extends Repository { |
|
60 | 59 | /** |
61 | 60 | * Create new instance |
62 | 61 | * @param EntityManager<Audit> $manager |
63 | 62 | */ |
64 | - public function __construct(EntityManager $manager) |
|
65 | - { |
|
63 | + public function __construct(EntityManager $manager) { |
|
66 | 64 | parent::__construct($manager, Audit::class); |
67 | 65 | } |
68 | 66 | } |
@@ -56,14 +56,12 @@ discard block |
||
56 | 56 | * @package Platine\Framework\Form\Param |
57 | 57 | * @template TEntity as Entity |
58 | 58 | */ |
59 | -class BaseParam implements JsonSerializable |
|
60 | -{ |
|
59 | +class BaseParam implements JsonSerializable { |
|
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param array<string, mixed> $data |
64 | 63 | */ |
65 | - public function __construct(array $data = []) |
|
66 | - { |
|
64 | + public function __construct(array $data = []) { |
|
67 | 65 | $params = array_merge($this->getDefault(), $data); |
68 | 66 | $this->load($params); |
69 | 67 | } |
@@ -119,8 +117,7 @@ discard block |
||
119 | 117 | * Convert parameter to JSON array |
120 | 118 | * @return array<string, mixed> |
121 | 119 | */ |
122 | - public function jsonSerialize() |
|
123 | - { |
|
120 | + public function jsonSerialize() { |
|
124 | 121 | return $this->data(); |
125 | 122 | } |
126 | 123 | |
@@ -129,8 +126,7 @@ discard block |
||
129 | 126 | * @param string $name |
130 | 127 | * @return mixed|null |
131 | 128 | */ |
132 | - public function __get($name) |
|
133 | - { |
|
129 | + public function __get($name) { |
|
134 | 130 | if (property_exists($this, $name)) { |
135 | 131 | return $this->{$name}; |
136 | 132 | } |
@@ -58,14 +58,12 @@ |
||
58 | 58 | * @package Platine\Framework\OAuth2\Repository |
59 | 59 | * @extends Repository<OauthClient> |
60 | 60 | */ |
61 | -class ClientRepository extends Repository implements ClientRepositoryInterface |
|
62 | -{ |
|
61 | +class ClientRepository extends Repository implements ClientRepositoryInterface { |
|
63 | 62 | /** |
64 | 63 | * Create new instance |
65 | 64 | * @param EntityManager<OauthClient> $manager |
66 | 65 | */ |
67 | - public function __construct(EntityManager $manager) |
|
68 | - { |
|
66 | + public function __construct(EntityManager $manager) { |
|
69 | 67 | parent::__construct($manager, OauthClient::class); |
70 | 68 | } |
71 | 69 |
@@ -21,12 +21,12 @@ |
||
21 | 21 | */ |
22 | 22 | public static function mapEntity(EntityMapperInterface $mapper): void |
23 | 23 | { |
24 | - $mapper->primaryKey('authorization_code'); |
|
25 | - $mapper->useTimestamp(); |
|
26 | - $mapper->casts([ |
|
24 | + $mapper->primaryKey('authorization_code'); |
|
25 | + $mapper->useTimestamp(); |
|
26 | + $mapper->casts([ |
|
27 | 27 | 'expires' => 'date', |
28 | 28 | 'created_at' => 'date', |
29 | 29 | 'updated_at' => '?date', |
30 | - ]); |
|
30 | + ]); |
|
31 | 31 | } |
32 | 32 | } |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * @package Platine\Framework\OAuth2\Entity |
13 | 13 | * @extends Entity<OauthAuthorizationCode> |
14 | 14 | */ |
15 | -class OauthAuthorizationCode extends Entity |
|
16 | -{ |
|
15 | +class OauthAuthorizationCode extends Entity { |
|
17 | 16 | /** |
18 | 17 | * |
19 | 18 | * @param EntityMapperInterface<OauthAuthorizationCode> $mapper |
@@ -21,10 +21,10 @@ |
||
21 | 21 | */ |
22 | 22 | public static function mapEntity(EntityMapperInterface $mapper): void |
23 | 23 | { |
24 | - $mapper->useTimestamp(); |
|
25 | - $mapper->casts([ |
|
24 | + $mapper->useTimestamp(); |
|
25 | + $mapper->casts([ |
|
26 | 26 | 'created_at' => 'date', |
27 | 27 | 'updated_at' => '?date', |
28 | - ]); |
|
28 | + ]); |
|
29 | 29 | } |
30 | 30 | } |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * @package Platine\Framework\OAuth2\Entity |
13 | 13 | * @extends Entity<OauthClient> |
14 | 14 | */ |
15 | -class OauthClient extends Entity |
|
16 | -{ |
|
15 | +class OauthClient extends Entity { |
|
17 | 16 | /** |
18 | 17 | * |
19 | 18 | * @param EntityMapperInterface<OauthClient> $mapper |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * @package Platine\Framework\OAuth2\Entity |
13 | 13 | * @extends Entity<OauthScope> |
14 | 14 | */ |
15 | -class OauthScope extends Entity |
|
16 | -{ |
|
15 | +class OauthScope extends Entity { |
|
17 | 16 | /** |
18 | 17 | * |
19 | 18 | * @param EntityMapperInterface<OauthScope> $mapper |
@@ -21,10 +21,10 @@ |
||
21 | 21 | */ |
22 | 22 | public static function mapEntity(EntityMapperInterface $mapper): void |
23 | 23 | { |
24 | - $mapper->useTimestamp(); |
|
25 | - $mapper->casts([ |
|
24 | + $mapper->useTimestamp(); |
|
25 | + $mapper->casts([ |
|
26 | 26 | 'created_at' => 'date', |
27 | 27 | 'updated_at' => '?date', |
28 | - ]); |
|
28 | + ]); |
|
29 | 29 | } |
30 | 30 | } |
@@ -20,12 +20,12 @@ |
||
20 | 20 | */ |
21 | 21 | public static function mapEntity(EntityMapperInterface $mapper): void |
22 | 22 | { |
23 | - $mapper->primaryKey('refresh_token'); |
|
24 | - $mapper->useTimestamp(); |
|
25 | - $mapper->casts([ |
|
23 | + $mapper->primaryKey('refresh_token'); |
|
24 | + $mapper->useTimestamp(); |
|
25 | + $mapper->casts([ |
|
26 | 26 | 'expires' => 'date', |
27 | 27 | 'created_at' => 'date', |
28 | 28 | 'updated_at' => '?date', |
29 | - ]); |
|
29 | + ]); |
|
30 | 30 | } |
31 | 31 | } |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * @package Platine\Framework\OAuth2\Entity |
13 | 13 | * @extends Entity<OauthRefreshToken> |
14 | 14 | */ |
15 | -class OauthRefreshToken extends Entity |
|
16 | -{ |
|
15 | +class OauthRefreshToken extends Entity { |
|
17 | 16 | /** |
18 | 17 | * @param EntityMapperInterface<OauthRefreshToken> $mapper |
19 | 18 | * @return void |