Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
InstallationArguments
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
12
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
12
1<?php /** @noinspection PhpUnhandledExceptionInspection */
2
3class InstallationArguments extends DataCollection {
4  public string $user_name = 'super';
5  public string $user_password = 'user123';
6  public string $workspace = 'sample_workspace';
7
8  public bool $overwrite_existing_installation = false;
9  public bool $skip_db_integrity_check = false;
10  public bool $skip_read_workspace_files = false;
11
12  public function __construct($initData) {
13    if (isset($initData['user_password']) and (strlen($initData['user_password']) < 7)) {
14      throw new Exception("Password must have at least 7 characters!");
15    }
16
17    $initData['overwrite_existing_installation'] = isset($initData['overwrite_existing_installation']);
18    $initData['skip_db_integrity_check'] = isset($initData['skip_db_integrity_check']);
19    $initData['skip_read_workspace_files'] = isset($initData['skip_read_workspace_files']);
20
21    parent::__construct($initData);
22  }
23}