|
7 | 7 |
|
8 | 8 | class ExpiredTokensCommand extends Command
|
9 | 9 | {
|
10 |
| - /** |
11 |
| - * The console command name. |
12 |
| - * |
13 |
| - * @var string |
14 |
| - */ |
15 |
| - protected $name = 'oauth:expired-tokens'; |
| 10 | + /** |
| 11 | + * The console command name. |
| 12 | + * |
| 13 | + * @var string |
| 14 | + */ |
| 15 | + protected $name = 'oauth:expired-tokens'; |
16 | 16 |
|
17 |
| - /** |
18 |
| - * The console command description. |
19 |
| - * |
20 |
| - * @var string |
21 |
| - */ |
22 |
| - protected $description = 'A command to delete the OAuth expired tokens'; |
| 17 | + /** |
| 18 | + * The console command description. |
| 19 | + * |
| 20 | + * @var string |
| 21 | + */ |
| 22 | + protected $description = 'A command to delete the OAuth expired tokens'; |
23 | 23 |
|
24 | 24 |
|
25 |
| - protected $sessions; |
| 25 | + protected $sessions; |
26 | 26 |
|
27 |
| - /** |
28 |
| - * Create a new command instance. |
29 |
| - * |
30 |
| - * @return void |
31 |
| - */ |
32 |
| - public function __construct(SessionManagementInterface $sessions) |
33 |
| - { |
34 |
| - parent::__construct(); |
| 27 | + /** |
| 28 | + * Create a new command instance. |
| 29 | + * |
| 30 | + * @return void |
| 31 | + */ |
| 32 | + public function __construct(SessionManagementInterface $sessions) |
| 33 | + { |
| 34 | + parent::__construct(); |
35 | 35 |
|
36 |
| - $this->sessions = $sessions; |
37 |
| - } |
| 36 | + $this->sessions = $sessions; |
| 37 | + } |
38 | 38 |
|
39 |
| - /** |
40 |
| - * Execute the console command. |
41 |
| - * |
42 |
| - * @return void |
43 |
| - */ |
44 |
| - public function fire() |
45 |
| - { |
46 |
| - $value = $this->option('delete'); |
47 |
| - if ($value === true) { |
48 |
| - $result = $this->deleteExpiredTokens(); |
49 |
| - $this->info($result . ' expired OAuth tokens were deleted'); |
50 |
| - } |
51 |
| - else { |
52 |
| - $this->info('use the --delete option to trigger the delete of the expired tokens'); |
53 |
| - } |
54 |
| - } |
| 39 | + /** |
| 40 | + * Execute the console command. |
| 41 | + * |
| 42 | + * @return void |
| 43 | + */ |
| 44 | + public function fire() |
| 45 | + { |
| 46 | + $value = $this->option('delete'); |
| 47 | + if ($value === true) { |
| 48 | + $result = $this->deleteExpiredTokens(); |
| 49 | + $this->info($result . ' expired OAuth tokens were deleted'); |
| 50 | + } else { |
| 51 | + $this->info('use the --delete option to trigger the delete of the expired tokens'); |
| 52 | + } |
| 53 | + } |
55 | 54 |
|
56 |
| - /** |
57 |
| - * Get the console command arguments. |
58 |
| - * |
59 |
| - * @return array |
60 |
| - */ |
61 |
| - protected function getArguments() |
62 |
| - { |
63 |
| - return array(); |
64 |
| - } |
| 55 | + /** |
| 56 | + * Get the console command arguments. |
| 57 | + * |
| 58 | + * @return array |
| 59 | + */ |
| 60 | + protected function getArguments() |
| 61 | + { |
| 62 | + return array(); |
| 63 | + } |
65 | 64 |
|
66 |
| - /** |
67 |
| - * Get the console command options. |
68 |
| - * |
69 |
| - * @return array |
70 |
| - */ |
71 |
| - protected function getOptions() |
72 |
| - { |
73 |
| - return array( |
74 |
| - array('delete', null, InputOption::VALUE_NONE, 'Effectively delete the tokens', null), |
75 |
| - ); |
76 |
| - } |
| 65 | + /** |
| 66 | + * Get the console command options. |
| 67 | + * |
| 68 | + * @return array |
| 69 | + */ |
| 70 | + protected function getOptions() |
| 71 | + { |
| 72 | + return array( |
| 73 | + array('delete', null, InputOption::VALUE_NONE, 'Effectively delete the tokens', null), |
| 74 | + ); |
| 75 | + } |
77 | 76 |
|
78 |
| - protected function deleteExpiredTokens() |
79 |
| - { |
80 |
| - return $this->sessions->deleteExpired(); |
81 |
| - } |
| 77 | + protected function deleteExpiredTokens() |
| 78 | + { |
| 79 | + return $this->sessions->deleteExpired(); |
| 80 | + } |
82 | 81 | }
|
0 commit comments