| 1 | <?php |
||
| 12 | class SimpleSender |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var TgLog |
||
| 16 | */ |
||
| 17 | private $client; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param TgLog $client |
||
| 21 | */ |
||
| 22 | public function __construct(TgLog $client) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Send simple message |
||
| 29 | * |
||
| 30 | * @param int $chatId |
||
| 31 | * @param string $text |
||
| 32 | * |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | public function sendMessage(int $chatId, string $text): bool |
||
| 49 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.