mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-18 23:26:20 +02:00
Bump phpstan to level 8
This commit is contained in:
@@ -27,6 +27,8 @@ use Monolog\Logger;
|
||||
* @link https://core.telegram.org/bots/api
|
||||
*
|
||||
* @author Mazur Alexandr <alexandrmazur96@gmail.com>
|
||||
*
|
||||
* @phpstan-import-type Record from \Monolog\Logger
|
||||
*/
|
||||
class TelegramBotHandler extends AbstractProcessingHandler
|
||||
{
|
||||
@@ -127,6 +129,7 @@ class TelegramBotHandler extends AbstractProcessingHandler
|
||||
*/
|
||||
public function handleBatch(array $records): void
|
||||
{
|
||||
/** @var Record[] $messages */
|
||||
$messages = [];
|
||||
|
||||
foreach ($records as $record) {
|
||||
@@ -135,6 +138,7 @@ class TelegramBotHandler extends AbstractProcessingHandler
|
||||
}
|
||||
|
||||
if ($this->processors) {
|
||||
/** @var Record $record */
|
||||
$record = $this->processRecord($record);
|
||||
}
|
||||
|
||||
@@ -174,6 +178,9 @@ class TelegramBotHandler extends AbstractProcessingHandler
|
||||
]));
|
||||
|
||||
$result = Curl\Util::execute($ch);
|
||||
if (!is_string($result)) {
|
||||
throw new RuntimeException('Telegram API error. Description: No response');
|
||||
}
|
||||
$result = json_decode($result, true);
|
||||
|
||||
if ($result['ok'] === false) {
|
||||
|
Reference in New Issue
Block a user