Passed
Push — master ( 061776...663521 )
by Shahrad
02:04
created

PluginEventsTrait::onCallbackQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 2
1
<?php
2
declare(strict_types=1);
3
4
namespace TelegramBot\Traits;
5
6
use TelegramBot\Entities\CallbackQuery;
7
use TelegramBot\Entities\ChannelPost;
8
use TelegramBot\Entities\ChosenInlineResult;
9
use TelegramBot\Entities\EditedChannelPost;
10
use TelegramBot\Entities\EditedMessage;
11
use TelegramBot\Entities\InlineQuery;
12
use TelegramBot\Entities\Message;
13
use TelegramBot\Entities\Payments\PreCheckoutQuery;
14
use TelegramBot\Entities\Payments\ShippingQuery;
15
use TelegramBot\Entities\Poll;
16
use TelegramBot\Entities\PollAnswer;
17
use TelegramBot\Entities\Update;
18
use TelegramBot\Entities\WebAppData;
19
20
trait PluginEventsTrait
21
{
22
23
    public function onUpdate(Update $update): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $update is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

23
    public function onUpdate(/** @scrutinizer ignore-unused */ Update $update): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
24
    {
25
        return yield;
26
    }
27
28
    public function onMessage(int $update_id, Message $message): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $message is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public function onMessage(int $update_id, /** @scrutinizer ignore-unused */ Message $message): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public function onMessage(/** @scrutinizer ignore-unused */ int $update_id, Message $message): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30
        return yield;
31
    }
32
33
    public function onEditedMessage(int $update_id, EditedMessage $editedMessage): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $editedMessage is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

33
    public function onEditedMessage(int $update_id, /** @scrutinizer ignore-unused */ EditedMessage $editedMessage): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

33
    public function onEditedMessage(/** @scrutinizer ignore-unused */ int $update_id, EditedMessage $editedMessage): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
34
    {
35
        return yield;
36
    }
37
38
    public function onChannelPost(int $update_id, ChannelPost $channelPost): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

38
    public function onChannelPost(/** @scrutinizer ignore-unused */ int $update_id, ChannelPost $channelPost): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $channelPost is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

38
    public function onChannelPost(int $update_id, /** @scrutinizer ignore-unused */ ChannelPost $channelPost): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
39
    {
40
        return yield;
41
    }
42
43
    public function onEditedChannelPost(int $update_id, EditedChannelPost $editedChannelPost): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $editedChannelPost is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

43
    public function onEditedChannelPost(int $update_id, /** @scrutinizer ignore-unused */ EditedChannelPost $editedChannelPost): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

43
    public function onEditedChannelPost(/** @scrutinizer ignore-unused */ int $update_id, EditedChannelPost $editedChannelPost): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
44
    {
45
        return yield;
46
    }
47
48
    public function onInlineQuery(int $update_id, InlineQuery $inlineQuery): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $inlineQuery is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

48
    public function onInlineQuery(int $update_id, /** @scrutinizer ignore-unused */ InlineQuery $inlineQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

48
    public function onInlineQuery(/** @scrutinizer ignore-unused */ int $update_id, InlineQuery $inlineQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
49
    {
50
        return yield;
51
    }
52
53
    public function onChosenInlineResult(int $update_id, ChosenInlineResult $chosenInlineResult): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $chosenInlineResult is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

53
    public function onChosenInlineResult(int $update_id, /** @scrutinizer ignore-unused */ ChosenInlineResult $chosenInlineResult): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

53
    public function onChosenInlineResult(/** @scrutinizer ignore-unused */ int $update_id, ChosenInlineResult $chosenInlineResult): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
54
    {
55
        return yield;
56
    }
57
58
    public function onCallbackQuery(int $update_id, CallbackQuery $callbackQuery): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $callbackQuery is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

58
    public function onCallbackQuery(int $update_id, /** @scrutinizer ignore-unused */ CallbackQuery $callbackQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

58
    public function onCallbackQuery(/** @scrutinizer ignore-unused */ int $update_id, CallbackQuery $callbackQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
59
    {
60
        return yield;
61
    }
62
63
    public function onShippingQuery(int $update_id, ShippingQuery $shippingQuery): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $shippingQuery is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

63
    public function onShippingQuery(int $update_id, /** @scrutinizer ignore-unused */ ShippingQuery $shippingQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

63
    public function onShippingQuery(/** @scrutinizer ignore-unused */ int $update_id, ShippingQuery $shippingQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
64
    {
65
        return yield;
66
    }
67
68
    public function onPreCheckoutQuery(int $update_id, PreCheckoutQuery $preCheckoutQuery): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

68
    public function onPreCheckoutQuery(/** @scrutinizer ignore-unused */ int $update_id, PreCheckoutQuery $preCheckoutQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $preCheckoutQuery is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

68
    public function onPreCheckoutQuery(int $update_id, /** @scrutinizer ignore-unused */ PreCheckoutQuery $preCheckoutQuery): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
69
    {
70
        return yield;
71
    }
72
73
    public function onPoll(int $update_id, Poll $poll): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

73
    public function onPoll(/** @scrutinizer ignore-unused */ int $update_id, Poll $poll): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $poll is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

73
    public function onPoll(int $update_id, /** @scrutinizer ignore-unused */ Poll $poll): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
74
    {
75
        return yield;
76
    }
77
78
    public function onPollAnswer(int $update_id, PollAnswer $pollAnswer): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $pollAnswer is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

78
    public function onPollAnswer(int $update_id, /** @scrutinizer ignore-unused */ PollAnswer $pollAnswer): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

78
    public function onPollAnswer(/** @scrutinizer ignore-unused */ int $update_id, PollAnswer $pollAnswer): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
79
    {
80
        return yield;
81
    }
82
83
    public function onWebAppData(int $update_id, WebAppData $webAppData): \Generator
0 ignored issues
show
Unused Code introduced by
The parameter $webAppData is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

83
    public function onWebAppData(int $update_id, /** @scrutinizer ignore-unused */ WebAppData $webAppData): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $update_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

83
    public function onWebAppData(/** @scrutinizer ignore-unused */ int $update_id, WebAppData $webAppData): \Generator

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
84
    {
85
        return yield;
86
    }
87
88
}