| Total Complexity | 7 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | trait EnvironmentsTrait |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Admin chat id |
||
| 18 | * |
||
| 19 | * @var int |
||
| 20 | */ |
||
| 21 | protected static int $adminId = -1; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Get env file path and return it |
||
| 25 | * |
||
| 26 | * @return string |
||
| 27 | */ |
||
| 28 | public static function getEnvFilePath(): string |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Set the admin chat id |
||
| 47 | * |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | public static function getAdminId(): int |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Set the admin chat id |
||
| 57 | * |
||
| 58 | * @param int $adminId |
||
| 59 | */ |
||
| 60 | public static function setAdminId(int $adminId): void |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Get token from env file. |
||
| 67 | * |
||
| 68 | * @param string $file |
||
| 69 | * @return string|null |
||
| 70 | */ |
||
| 71 | protected function getEnvToken(string $file): string|null |
||
| 77 | } |