| 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 | 10 | public function __construct(ILock $lock, string $path, ?IKATranslations $lang = null) |
|
| 32 | { |
||
| 33 | 10 | $this->setLang($lang); |
|
| 34 | 10 | $this->initAuthLock($lock); |
|
| 35 | 10 | $this->path = $path; |
|
| 36 | } |
||
| 37 | |||
| 38 | protected function checkRest(/** @scrutinizer ignore-unused */ int $groupId): void |
||
| 39 | { |
||
| 40 | // nothing here |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @throws AuthException |
||
| 45 | * @return array<int, array<int, string>> |
||
| 46 | */ |
||
| 47 | 8 | protected function openGroups(): array |
|
| 48 | { |
||
| 49 | 8 | return $this->openFile($this->path); |
|
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param array<int, array<int, string|int>> $lines |
||
| 54 | * @throws AuthException |
||
| 55 | */ |
||
| 56 | 3 | protected function saveGroups(array $lines): void |
|
| 59 | } |
||
| 60 | } |
||
| 61 |