| Total Complexity | 8 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | abstract class AAdapter |
||
| 16 | { |
||
| 17 | use TLang; |
||
| 18 | |||
| 19 | protected ?Interfaces\IAuth $auth = null; |
||
| 20 | protected ?Interfaces\IProcessAccounts $accounts = null; |
||
| 21 | protected ?Interfaces\IProcessClasses $classes = null; |
||
| 22 | protected ?Interfaces\IProcessGroups $groups = null; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @throws AuthSourcesException |
||
| 26 | * @return Interfaces\IAuth |
||
| 27 | */ |
||
| 28 | 6 | public function getAuth(): Interfaces\IAuth |
|
| 29 | { |
||
| 30 | 6 | if (!$this->auth) { |
|
| 31 | 1 | throw new AuthSourcesException($this->getAusLang()->kauGroupMissAccounts()); |
|
| 32 | } |
||
| 33 | 5 | return $this->auth; |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @throws AuthSourcesException |
||
| 38 | * @return Interfaces\IProcessAccounts |
||
| 39 | */ |
||
| 40 | 6 | public function getAccounts(): Interfaces\IProcessAccounts |
|
| 41 | { |
||
| 42 | 6 | if (!$this->accounts) { |
|
| 43 | 1 | throw new AuthSourcesException($this->getAusLang()->kauGroupMissAuth()); |
|
| 44 | } |
||
| 45 | 5 | return $this->accounts; |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @throws AuthSourcesException |
||
| 50 | * @return Interfaces\IProcessClasses |
||
| 51 | */ |
||
| 52 | 5 | public function getClasses(): Interfaces\IProcessClasses |
|
| 53 | { |
||
| 54 | 5 | if (!$this->classes) { |
|
| 55 | 1 | throw new AuthSourcesException($this->getAusLang()->kauGroupMissClasses()); |
|
| 56 | } |
||
| 57 | 4 | return $this->classes; |
|
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @throws AuthSourcesException |
||
| 62 | * @return Interfaces\IProcessGroups |
||
| 63 | */ |
||
| 64 | 5 | public function getGroups(): Interfaces\IProcessGroups |
|
| 70 | } |
||
| 71 | } |
||
| 72 |