Total Complexity | 4 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
17 | abstract class AGroups implements IAccessGroups |
||
18 | { |
||
19 | use TGroups; |
||
20 | use TLines; |
||
21 | use TStore; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $path = ''; |
||
25 | |||
26 | /** |
||
27 | * @param ILock $lock |
||
28 | * @param string $path full path to group file |
||
29 | * @param IKATranslations|null $lang |
||
30 | */ |
||
31 | 17 | public function __construct(ILock $lock, string $path, ?IKATranslations $lang = null) |
|
32 | { |
||
33 | 17 | $this->setLang($lang); |
|
34 | 17 | $this->initAuthLock($lock); |
|
35 | 17 | $this->path = $path; |
|
36 | 17 | } |
|
37 | |||
38 | 5 | protected function checkRest(/** @scrutinizer ignore-unused */ int $groupId): void |
|
39 | { |
||
40 | // nothing here |
||
41 | 5 | } |
|
42 | |||
43 | /** |
||
44 | * @throws AuthException |
||
45 | * @return array<int, array<int, string>> |
||
46 | */ |
||
47 | 13 | protected function openGroups(): array |
|
48 | { |
||
49 | 13 | return $this->openFile($this->path); |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * @param array<int, array<int, string|int>> $lines |
||
54 | * @throws AuthException |
||
55 | */ |
||
56 | 5 | protected function saveGroups(array $lines): void |
|
59 | 3 | } |
|
60 | } |
||
61 |