@@ -79,7 +79,7 @@ |
||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | if (!Telegram::validateToken($_ENV['TELEGRAM_BOT_TOKEN'] ?? '')) { |
| 82 | - Telegram::tryAutoloadEnv(); |
|
| 82 | + Telegram::tryAutoloadEnv(); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | if (($token = self::loadToken()) === null) { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return string|null |
| 29 | 29 | */ |
| 30 | - protected static function guessEnvPath(): string|null |
|
| 30 | + protected static function guessEnvPath(): string|null |
|
| 31 | 31 | { |
| 32 | 32 | $defaultEnvPaths = [ |
| 33 | 33 | getcwd() . '/.env', |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | protected static function tryAutoloadEnv(): void { |
| 48 | - $envPath = static::guessEnvPath(); |
|
| 49 | - if ($envPath !== null) { |
|
| 48 | + $envPath = static::guessEnvPath(); |
|
| 49 | + if ($envPath !== null) { |
|
| 50 | 50 | (new Dotenv())->load($envPath); |
| 51 | - } |
|
| 51 | + } |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |