@@ -55,15 +55,13 @@ |
||
55 | 55 | * class RoleRepository |
56 | 56 | * @package Platine\Framework\Auth\Repository |
57 | 57 | */ |
58 | -class RoleRepository extends Repository |
|
59 | -{ |
|
58 | +class RoleRepository extends Repository { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param EntityManager $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 | } |
@@ -55,15 +55,13 @@ |
||
55 | 55 | * class UserRepository |
56 | 56 | * @package Platine\Framework\Auth\Repository |
57 | 57 | */ |
58 | -class UserRepository extends Repository |
|
59 | -{ |
|
58 | +class UserRepository extends Repository { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param EntityManager $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 | } |
@@ -55,15 +55,13 @@ |
||
55 | 55 | * class PermissionRepository |
56 | 56 | * @package Platine\Framework\Auth\Repository |
57 | 57 | */ |
58 | -class PermissionRepository extends Repository |
|
59 | -{ |
|
58 | +class PermissionRepository extends Repository { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param EntityManager $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 | } |
@@ -14,8 +14,7 @@ |
||
14 | 14 | * |
15 | 15 | * @author tony |
16 | 16 | */ |
17 | -class LogoutAction implements RequestHandlerInterface |
|
18 | -{ |
|
17 | +class LogoutAction implements RequestHandlerInterface { |
|
19 | 18 | |
20 | 19 | protected RouteHelper $routeHelper; |
21 | 20 | protected AuthenticationInterface $authentication; |
@@ -116,7 +116,7 @@ |
||
116 | 116 | $this->template, |
117 | 117 | 'user/login', |
118 | 118 | [ |
119 | - 'param' => $formParam |
|
119 | + 'param' => $formParam |
|
120 | 120 | ] |
121 | 121 | ); |
122 | 122 | } |
@@ -26,8 +26,7 @@ |
||
26 | 26 | * |
27 | 27 | * @author tony |
28 | 28 | */ |
29 | -class LoginAction implements RequestHandlerInterface |
|
30 | -{ |
|
29 | +class LoginAction implements RequestHandlerInterface { |
|
31 | 30 | |
32 | 31 | protected LoggerInterface $logger; |
33 | 32 | protected Template $template; |
@@ -46,8 +46,8 @@ |
||
46 | 46 | { |
47 | 47 | $id = (int) $request->getAttribute('id'); |
48 | 48 | $user = $this->userRepository |
49 | - ->with('roles') |
|
50 | - ->find($id); |
|
49 | + ->with('roles') |
|
50 | + ->find($id); |
|
51 | 51 | if (!$user) { |
52 | 52 | $this->session->setFlash('error', 'Can not find the user'); |
53 | 53 | $this->logger->warning('Can not find user with id {id}', ['id' => $id]); |
@@ -41,8 +41,7 @@ |
||
41 | 41 | * @class HttpException |
42 | 42 | * @package Platine\Framework\Http\Exception |
43 | 43 | */ |
44 | -class HttpException extends Exception |
|
45 | -{ |
|
44 | +class HttpException extends Exception { |
|
46 | 45 | /** |
47 | 46 | * The instance of server request that throw this exception |
48 | 47 | * @var ServerRequestInterface |
@@ -40,8 +40,7 @@ |
||
40 | 40 | * @class HttpSpecialException |
41 | 41 | * @package Platine\Framework\Http\Exception |
42 | 42 | */ |
43 | -abstract class HttpSpecialException extends HttpException |
|
44 | -{ |
|
43 | +abstract class HttpSpecialException extends HttpException { |
|
45 | 44 | /** |
46 | 45 | * Create new instance |
47 | 46 | * @param ServerRequestInterface $request |
@@ -37,8 +37,7 @@ |
||
37 | 37 | * @class HttpNotFoundException |
38 | 38 | * @package Platine\Framework\Http\Exception |
39 | 39 | */ |
40 | -class HttpNotFoundException extends HttpSpecialException |
|
41 | -{ |
|
40 | +class HttpNotFoundException extends HttpSpecialException { |
|
42 | 41 | /** |
43 | 42 | * |
44 | 43 | * @var int |