Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class SetupAccountIdSave extends Menu |
||
12 | { |
||
13 | 12 | public static function scriptFilter() |
|
14 | { |
||
15 | 12 | self::saveAccountId(); |
|
16 | |||
17 | 12 | ScriptFilter::add( |
|
18 | 12 | self::accountIdSaved(), |
|
19 | 12 | self::back() |
|
20 | ); |
||
21 | 12 | } |
|
22 | |||
23 | 12 | private static function saveAccountId() |
|
24 | { |
||
25 | 12 | Workflow::getConfig()->write('harvest.account_id', getenv('harvest_account_id')); |
|
26 | 12 | } |
|
27 | |||
28 | 12 | private static function accountIdSaved() |
|
29 | { |
||
30 | 12 | return Item::create() |
|
31 | 12 | ->title('Account ID SAVED!') |
|
32 | 12 | ->subtitle('You can just press Enter.') |
|
33 | 12 | ->icon(Icon::create('resources/icons/harvest.png')) |
|
34 | 12 | ->arg('do') |
|
35 | 12 | ->variable('action', 'exit'); |
|
36 | } |
||
37 | |||
38 | 12 | private static function back() |
|
45 | } |
||
46 | } |
||
47 |