@@ -51,8 +51,7 @@ |
||
51 | 51 | * @class SchedulerInterface |
52 | 52 | * @package Platine\Framework\Task |
53 | 53 | */ |
54 | -interface SchedulerInterface |
|
55 | -{ |
|
54 | +interface SchedulerInterface { |
|
56 | 55 | /** |
57 | 56 | * Execute the scheduler |
58 | 57 | * @return void |
@@ -73,7 +73,7 @@ |
||
73 | 73 | parent::__construct($scheduler, $application, $config); |
74 | 74 | |
75 | 75 | $this->setName('scheduler:list') |
76 | - ->setDescription('Show the list of scheduled tasks'); |
|
76 | + ->setDescription('Show the list of scheduled tasks'); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @template T |
60 | 60 | * @extends AbstractCommand<T> |
61 | 61 | */ |
62 | -class SchedulerListCommand extends AbstractCommand |
|
63 | -{ |
|
62 | +class SchedulerListCommand extends AbstractCommand { |
|
64 | 63 | /** |
65 | 64 | * Create new instance |
66 | 65 | * @param SchedulerInterface $scheduler |
@@ -81,8 +80,7 @@ discard block |
||
81 | 80 | /** |
82 | 81 | * {@inheritdoc} |
83 | 82 | */ |
84 | - public function execute() |
|
85 | - { |
|
83 | + public function execute() { |
|
86 | 84 | //Load the task list |
87 | 85 | $this->loadTasks(); |
88 | 86 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | parent::__construct($scheduler, $application, $config); |
73 | 73 | |
74 | 74 | $this->setName('scheduler:run') |
75 | - ->setDescription('Execute the scheduled tasks'); |
|
75 | + ->setDescription('Execute the scheduled tasks'); |
|
76 | 76 | |
77 | 77 | $this->addArgument('name', 'the name of task to execute instead of all', null, false, true); |
78 | 78 | } |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @template T |
58 | 58 | * @extends AbstractCommand<T> |
59 | 59 | */ |
60 | -class SchedulerRunCommand extends AbstractCommand |
|
61 | -{ |
|
60 | +class SchedulerRunCommand extends AbstractCommand { |
|
62 | 61 | /** |
63 | 62 | * Create new instance |
64 | 63 | * @param SchedulerInterface $scheduler |
@@ -81,8 +80,7 @@ discard block |
||
81 | 80 | /** |
82 | 81 | * {@inheritdoc} |
83 | 82 | */ |
84 | - public function execute() |
|
85 | - { |
|
83 | + public function execute() { |
|
86 | 84 | //Load the task |
87 | 85 | $this->loadTasks(); |
88 | 86 |
@@ -57,8 +57,7 @@ |
||
57 | 57 | * @class SchedulerServiceProvider |
58 | 58 | * @package Platine\Framework\Service\Provider |
59 | 59 | */ |
60 | -class SchedulerServiceProvider extends ServiceProvider |
|
61 | -{ |
|
60 | +class SchedulerServiceProvider extends ServiceProvider { |
|
62 | 61 | /** |
63 | 62 | * {@inheritdoc} |
64 | 63 | */ |
@@ -88,7 +88,7 @@ |
||
88 | 88 | ) { |
89 | 89 | parent::__construct($application, $filesystem); |
90 | 90 | $this->setName('make:task') |
91 | - ->setDescription('Command to generate new task class'); |
|
91 | + ->setDescription('Command to generate new task class'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -58,8 +58,7 @@ |
||
58 | 58 | * @class MakeTaskCommand |
59 | 59 | * @package Platine\Framework\Console\Command |
60 | 60 | */ |
61 | -class MakeTaskCommand extends MakeCommand |
|
62 | -{ |
|
61 | +class MakeTaskCommand extends MakeCommand { |
|
63 | 62 | /** |
64 | 63 | * {@inheritdoc} |
65 | 64 | */ |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | * @class PasswordGenerateCommand |
57 | 57 | * @package Platine\Framework\Console |
58 | 58 | */ |
59 | -class PasswordGenerateCommand extends Command |
|
60 | -{ |
|
59 | +class PasswordGenerateCommand extends Command { |
|
61 | 60 | /** |
62 | 61 | * The Hash instance |
63 | 62 | * @var HashInterface |
@@ -85,8 +84,7 @@ discard block |
||
85 | 84 | /** |
86 | 85 | * {@inheritdoc} |
87 | 86 | */ |
88 | - public function execute() |
|
89 | - { |
|
87 | + public function execute() { |
|
90 | 88 | $io = $this->io(); |
91 | 89 | $writer = $io->writer(); |
92 | 90 | $password = $this->password; |
@@ -82,7 +82,7 @@ |
||
82 | 82 | ) { |
83 | 83 | parent::__construct($application, $filesystem); |
84 | 84 | $this->setName('make:enum') |
85 | - ->setDescription('Command to generate new enumeration class'); |
|
85 | + ->setDescription('Command to generate new enumeration class'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -58,8 +58,7 @@ |
||
58 | 58 | * @class MakeEnumCommand |
59 | 59 | * @package Platine\Framework\Console\Command |
60 | 60 | */ |
61 | -class MakeEnumCommand extends MakeCommand |
|
62 | -{ |
|
61 | +class MakeEnumCommand extends MakeCommand { |
|
63 | 62 | /** |
64 | 63 | * {@inheritdoc} |
65 | 64 | */ |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class AuthLoginEvent |
55 | 55 | * @package Platine\Framework\Auth\Event |
56 | 56 | */ |
57 | -class AuthLoginEvent extends Event |
|
58 | -{ |
|
57 | +class AuthLoginEvent extends Event { |
|
59 | 58 | /** |
60 | 59 | * The authentication user |
61 | 60 | * @var User |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | * Create new instance |
67 | 66 | * @param User $user |
68 | 67 | */ |
69 | - public function __construct(User $user) |
|
70 | - { |
|
68 | + public function __construct(User $user) { |
|
71 | 69 | parent::__construct(__CLASS__, []); |
72 | 70 | $this->user = $user; |
73 | 71 | } |
@@ -94,8 +94,7 @@ |
||
94 | 94 | * @class OAuth2ServiceProvider |
95 | 95 | * @package Platine\App\Provider |
96 | 96 | */ |
97 | -class OAuth2ServiceProvider extends ServiceProvider |
|
98 | -{ |
|
97 | +class OAuth2ServiceProvider extends ServiceProvider { |
|
99 | 98 | /** |
100 | 99 | * {@inheritdoc} |
101 | 100 | */ |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $this->app->bind(UserAuthenticationInterface::class, UserAuthentication::class); |
106 | 106 | |
107 | 107 | // Configuration |
108 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) { |
|
108 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) { |
|
109 | 109 | return new Configuration($app->get(Config::class)->get('oauth2', [])); |
110 | 110 | }); |
111 | 111 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function addRoutes(Router $router): void |
166 | 166 | { |
167 | - $router->group('/oauth2', function (Router $router) { |
|
167 | + $router->group('/oauth2', function(Router $router) { |
|
168 | 168 | $router->post('/token', AccessTokenRequestHandler::class, 'oauth2_access_token'); |
169 | 169 | $router->add('/authorize', AuthorizationRequestHandler::class, ['GET', 'POST'], 'oauth2_authorization_code'); |
170 | 170 | $router->post('/revocation', TokenRevocationRequestHandler::class, 'oauth2_revoke_access_token'); |