@@ -56,14 +56,12 @@ |
||
56 | 56 | * @package Platine\Framework\Auth\Repository |
57 | 57 | * @extends Repository<Role> |
58 | 58 | */ |
59 | -class RoleRepository extends Repository |
|
60 | -{ |
|
59 | +class RoleRepository extends Repository { |
|
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param EntityManager<Role> $manager |
64 | 63 | */ |
65 | - public function __construct(EntityManager $manager) |
|
66 | - { |
|
64 | + public function __construct(EntityManager $manager) { |
|
67 | 65 | parent::__construct($manager, Role::class); |
68 | 66 | } |
69 | 67 | } |
@@ -56,14 +56,12 @@ |
||
56 | 56 | * @package Platine\Framework\Auth\Repository |
57 | 57 | * @extends Repository<User> |
58 | 58 | */ |
59 | -class UserRepository extends Repository |
|
60 | -{ |
|
59 | +class UserRepository extends Repository { |
|
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param EntityManager<User> $manager |
64 | 63 | */ |
65 | - public function __construct(EntityManager $manager) |
|
66 | - { |
|
64 | + public function __construct(EntityManager $manager) { |
|
67 | 65 | parent::__construct($manager, User::class); |
68 | 66 | } |
69 | 67 | } |
@@ -56,14 +56,12 @@ |
||
56 | 56 | * @package Platine\Framework\Auth\Repository |
57 | 57 | * @extends Repository<Permission> |
58 | 58 | */ |
59 | -class PermissionRepository extends Repository |
|
60 | -{ |
|
59 | +class PermissionRepository extends Repository { |
|
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param EntityManager<Permission> $manager |
64 | 63 | */ |
65 | - public function __construct(EntityManager $manager) |
|
66 | - { |
|
64 | + public function __construct(EntityManager $manager) { |
|
67 | 65 | parent::__construct($manager, Permission::class); |
68 | 66 | } |
69 | 67 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | 'updated_at' => '?date', |
74 | 74 | ]); |
75 | 75 | |
76 | - $mapper->filter('status', function (Query $q, $status) { |
|
76 | + $mapper->filter('status', function(Query $q, $status) { |
|
77 | 77 | $q->where('status')->is($status); |
78 | 78 | }); |
79 | 79 | } |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @package Platine\Framework\Auth\Entity |
58 | 58 | * @extends Entity<User> |
59 | 59 | */ |
60 | -class User extends Entity implements IdentityInterface |
|
61 | -{ |
|
60 | +class User extends Entity implements IdentityInterface { |
|
62 | 61 | /** |
63 | 62 | * |
64 | 63 | * @param EntityMapperInterface<User> $mapper |
@@ -73,7 +72,7 @@ discard block |
||
73 | 72 | 'updated_at' => '?date', |
74 | 73 | ]); |
75 | 74 | |
76 | - $mapper->filter('status', function (Query $q, $status) { |
|
75 | + $mapper->filter('status', function (Query $q, $status) { |
|
77 | 76 | $q->where('status')->is($status); |
78 | 77 | }); |
79 | 78 | } |
@@ -85,7 +84,7 @@ discard block |
||
85 | 84 | */ |
86 | 85 | public function setRoles(array $roles): self |
87 | 86 | { |
88 | - foreach ($roles as $role) { |
|
87 | + foreach ($roles as $role) { |
|
89 | 88 | $this->mapper()->link('roles', $role); |
90 | 89 | } |
91 | 90 | |
@@ -99,7 +98,7 @@ discard block |
||
99 | 98 | */ |
100 | 99 | public function removeRoles(array $roles): self |
101 | 100 | { |
102 | - foreach ($roles as $role) { |
|
101 | + foreach ($roles as $role) { |
|
103 | 102 | $this->mapper()->unlink('roles', $role); |
104 | 103 | } |
105 | 104 | |
@@ -109,8 +108,7 @@ discard block |
||
109 | 108 | /** |
110 | 109 | * {@inheritdoc} |
111 | 110 | */ |
112 | - public function getId() |
|
113 | - { |
|
111 | + public function getId() { |
|
114 | 112 | return $this->mapper()->getColumn('id'); |
115 | 113 | } |
116 | 114 |
@@ -73,7 +73,7 @@ |
||
73 | 73 | 'updated_at' => '?date', |
74 | 74 | ]); |
75 | 75 | |
76 | - $mapper->filter('not_expire', function (Query $q, $date) { |
|
76 | + $mapper->filter('not_expire', function(Query $q, $date) { |
|
77 | 77 | $q->where('expire_at')->gt($date); |
78 | 78 | }); |
79 | 79 | } |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | * @package Platine\Framework\Auth\Entity |
57 | 57 | * @extends Entity<Token> |
58 | 58 | */ |
59 | -class Token extends Entity |
|
60 | -{ |
|
59 | +class Token extends Entity { |
|
61 | 60 | /** |
62 | 61 | * |
63 | 62 | * @param EntityMapperInterface<Token> $mapper |
@@ -73,7 +72,7 @@ discard block |
||
73 | 72 | 'updated_at' => '?date', |
74 | 73 | ]); |
75 | 74 | |
76 | - $mapper->filter('not_expire', function (Query $q, $date) { |
|
75 | + $mapper->filter('not_expire', function (Query $q, $date) { |
|
77 | 76 | $q->where('expire_at')->gt($date); |
78 | 77 | }); |
79 | 78 | } |