Total Complexity | 7 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 86.67% |
Changes | 0 |
1 | <?php |
||
7 | class ProtectedRange |
||
8 | { |
||
9 | private string $name = ''; |
||
10 | |||
11 | private string $password = ''; |
||
12 | |||
13 | private string $sqref; |
||
14 | |||
15 | private string $securityDescriptor = ''; |
||
16 | |||
17 | /** |
||
18 | * No setters aside from constructor. |
||
19 | */ |
||
20 | 26 | public function __construct(string $sqref, string $password = '', string $name = '', string $securityDescriptor = '') |
|
21 | { |
||
22 | 26 | $this->sqref = $sqref; |
|
23 | 26 | $this->name = $name; |
|
24 | 26 | $this->password = $password; |
|
25 | 26 | $this->securityDescriptor = $securityDescriptor; |
|
26 | } |
||
27 | |||
28 | public function getSqref(): string |
||
29 | { |
||
30 | return $this->sqref; |
||
31 | } |
||
32 | |||
33 | 9 | public function getName(): string |
|
36 | } |
||
37 | |||
38 | 20 | public function getPassword(): string |
|
39 | { |
||
40 | 20 | return $this->password; |
|
41 | } |
||
42 | |||
43 | 9 | public function getSecurityDescriptor(): string |
|
44 | { |
||
45 | 9 | return $this->securityDescriptor; |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * Split range into coordinate strings. |
||
50 | * |
||
51 | * @return array<array<string>> Array containing one or more arrays containing one or two coordinate strings |
||
52 | * e.g. ['B4','D9'] or [['B4','D9'], ['H2','O11']] |
||
53 | * or ['B4'] |
||
54 | */ |
||
55 | 1 | public function allRanges(): array |
|
58 | } |
||
59 | } |
||
60 |