Total Complexity | 2 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class BotBuilder |
||
11 | { |
||
12 | /** |
||
13 | * @var TelegramApiFactoryInterface|null |
||
14 | */ |
||
15 | private $telegramApiFactory; |
||
16 | |||
17 | public function create(): BotInterface |
||
18 | { |
||
19 | $this->telegramApiFactory = $this->telegramApiFactory ?? new TelegramApiFactory(); |
||
20 | |||
21 | return new UpdateBot($this->telegramApiFactory->create()); |
||
22 | } |
||
23 | |||
24 | public function setTelegramApiFactory(TelegramApiFactoryInterface $telegramApiFactory): self |
||
29 | } |
||
30 | } |
||
31 |