Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 16 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
turnstile_captcha | |
0.00% |
0 / 16 |
|
0.00% |
0 / 4 |
42 | |
0.00% |
0 / 1 |
effectively_installed | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
12 | |||
depends_on | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
update_data | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
revert_data | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * |
4 | * This file is part of the phpBB Forum Software package. |
5 | * |
6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
7 | * @license GNU General Public License, version 2 (GPL-2.0) |
8 | * |
9 | * For full copyright and license information, please see |
10 | * the docs/CREDITS.txt file. |
11 | * |
12 | */ |
13 | |
14 | namespace phpbb\db\migration\data\v400; |
15 | |
16 | use phpbb\db\migration\migration; |
17 | |
18 | class turnstile_captcha extends migration |
19 | { |
20 | public function effectively_installed(): bool |
21 | { |
22 | return $this->config->offsetExists('captcha_turnstile_sitekey') |
23 | && $this->config->offsetExists('captcha_turnstile_secret') |
24 | && $this->config->offsetExists('captcha_turnstile_theme'); |
25 | } |
26 | |
27 | public static function depends_on(): array |
28 | { |
29 | return [ |
30 | '\phpbb\db\migration\data\v400\dev', |
31 | ]; |
32 | } |
33 | |
34 | public function update_data(): array |
35 | { |
36 | return [ |
37 | ['config.add', ['captcha_turnstile_sitekey', '']], |
38 | ['config.add', ['captcha_turnstile_secret', '']], |
39 | ['config.add', ['captcha_turnstile_theme', 'light']], |
40 | ]; |
41 | } |
42 | |
43 | public function revert_data(): array |
44 | { |
45 | return [ |
46 | ['config.remove', ['captcha_turnstile_sitekey']], |
47 | ['config.remove', ['captcha_turnstile_secret']], |
48 | ['config.remove', ['captcha_turnstile_theme']], |
49 | ]; |
50 | } |
51 | } |