| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class InitController extends Controller |
||
| 13 | { |
||
| 14 | use ServiceTrait; |
||
| 15 | |||
| 16 | public function actionTelegram(string $url = '/v1/telegram/hook'): int |
||
| 17 | { |
||
| 18 | $url = Url::to($url, true); |
||
| 19 | TelegramService::newClient()->setWebHook($url); |
||
| 20 | $this->stdout("Telegram set Webhook url success!: {$url}\n"); |
||
| 21 | return ExitCode::OK; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param int $userId |
||
| 26 | * @throws \app\core\exceptions\InvalidArgumentException |
||
| 27 | * @throws \yii\db\Exception |
||
| 28 | */ |
||
| 29 | public function actionUserData(int $userId) |
||
| 33 | } |
||
| 34 | } |
||
| 35 |