Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | final class FlushTransientsCommand implements Bootable |
||
9 | { |
||
10 | /** |
||
11 | * Boot the service. |
||
12 | * |
||
13 | * @return void |
||
14 | */ |
||
15 | public static function boot(): void |
||
16 | { |
||
17 | WP_CLI::add_command('helick-related-posts flush-transients', static::class); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Flush transient data. |
||
22 | * |
||
23 | * @return void |
||
24 | */ |
||
25 | public function __invoke(): void |
||
26 | { |
||
27 | $this->deleteTransients(); |
||
28 | |||
29 | $this->deleteTransientTimeouts(); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Delete transients. |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | private function deleteTransients(): void |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Delete transient timeouts. |
||
49 | * |
||
50 | * @return void |
||
51 | */ |
||
52 | private function deleteTransientTimeouts(): void |
||
60 | } |
||
61 | } |
||
62 |