MainPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 2
b 0
f 0
dl 0
loc 6
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A onMessage() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TelegramBotTest\Examples\EchoBot\Plugins;
5
6
use PHPUnit\Framework\Assert;
7
use TelegramBot\Entities\Message;
8
9
class MainPlugin extends \TelegramBot\Plugin {
10
11
    public function onMessage(int $update_id, Message $message): \Generator {
12
        Assert::assertEquals('Hello World!', $message->getText());
13
        Assert::assertEquals(1, $update_id);
14
        yield;
15
    }
16
17
}
18