|
6 | 6 |
|
7 | 7 | use TgBotApi\BotApiBase\Exception\ResponseException;
|
8 | 8 | use TgBotApi\BotApiBase\Method\Interfaces\SetMethodAliasInterface;
|
| 9 | +use TgBotApi\BotApiBase\Method\SetChatAdministratorCustomTitleMethod; |
9 | 10 | use TgBotApi\BotApiBase\Method\SetChatDescriptionMethod;
|
10 | 11 | use TgBotApi\BotApiBase\Method\SetChatPermissionsMethod;
|
11 | 12 | use TgBotApi\BotApiBase\Method\SetChatPhotoMethod;
|
|
22 | 23 | trait SetMethodTrait
|
23 | 24 | {
|
24 | 25 | /**
|
25 |
| - * @param SetMethodAliasInterface $method |
26 |
| - * |
27 | 26 | * @throws ResponseException
|
28 |
| - * |
29 |
| - * @return bool |
30 | 27 | */
|
31 | 28 | abstract public function set(SetMethodAliasInterface $method): bool;
|
32 | 29 |
|
33 | 30 | /**
|
34 |
| - * @param SetChatDescriptionMethod $method |
35 |
| - * |
36 | 31 | * @throws ResponseException
|
37 |
| - * |
38 |
| - * @return bool |
39 | 32 | */
|
40 | 33 | public function setChatDescription(SetChatDescriptionMethod $method): bool
|
41 | 34 | {
|
42 | 35 | return $this->set($method);
|
43 | 36 | }
|
44 | 37 |
|
45 | 38 | /**
|
46 |
| - * @param SetChatPhotoMethod $method |
47 |
| - * |
48 | 39 | * @throws ResponseException
|
49 |
| - * |
50 |
| - * @return bool |
51 | 40 | */
|
52 | 41 | public function setChatPhoto(SetChatPhotoMethod $method): bool
|
53 | 42 | {
|
54 | 43 | return $this->set($method);
|
55 | 44 | }
|
56 | 45 |
|
57 | 46 | /**
|
58 |
| - * @param SetChatStickerSetMethod $method |
59 |
| - * |
60 | 47 | * @throws ResponseException
|
61 |
| - * |
62 |
| - * @return bool |
| 48 | + */ |
| 49 | + public function setChatAdministrator(SetChatAdministratorCustomTitleMethod $method): bool |
| 50 | + { |
| 51 | + return $this->set($method); |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * @throws ResponseException |
63 | 56 | */
|
64 | 57 | public function setChatStickerSet(SetChatStickerSetMethod $method): bool
|
65 | 58 | {
|
66 | 59 | return $this->set($method);
|
67 | 60 | }
|
68 | 61 |
|
69 | 62 | /**
|
70 |
| - * @param SetChatTitleMethod $method |
71 |
| - * |
72 | 63 | * @throws ResponseException
|
73 |
| - * |
74 |
| - * @return bool |
75 | 64 | */
|
76 | 65 | public function setChatTitle(SetChatTitleMethod $method): bool
|
77 | 66 | {
|
78 | 67 | return $this->set($method);
|
79 | 68 | }
|
80 | 69 |
|
81 | 70 | /**
|
82 |
| - * @param SetGameScoreMethod $method |
83 |
| - * |
84 | 71 | * @throws ResponseException
|
85 |
| - * |
86 |
| - * @return bool |
87 | 72 | */
|
88 | 73 | public function setGameScore(SetGameScoreMethod $method): bool
|
89 | 74 | {
|
90 | 75 | return $this->set($method);
|
91 | 76 | }
|
92 | 77 |
|
93 | 78 | /**
|
94 |
| - * @param SetStickerPositionInSetMethod $method |
95 |
| - * |
96 | 79 | * @throws ResponseException
|
97 |
| - * |
98 |
| - * @return bool |
99 | 80 | */
|
100 | 81 | public function setStickerPositionInSet(SetStickerPositionInSetMethod $method): bool
|
101 | 82 | {
|
102 | 83 | return $this->set($method);
|
103 | 84 | }
|
104 | 85 |
|
105 | 86 | /**
|
106 |
| - * @param SetWebhookMethod $method |
107 |
| - * |
108 | 87 | * @throws ResponseException
|
109 |
| - * |
110 |
| - * @return bool |
111 | 88 | */
|
112 | 89 | public function setWebhook(SetWebhookMethod $method): bool
|
113 | 90 | {
|
114 | 91 | return $this->set($method);
|
115 | 92 | }
|
116 | 93 |
|
117 | 94 | /**
|
118 |
| - * @param SetPassportDataErrorsMethod $method |
119 |
| - * |
120 | 95 | * @throws ResponseException
|
121 |
| - * |
122 |
| - * @return bool |
123 | 96 | */
|
124 | 97 | public function setPassportDataErrors(SetPassportDataErrorsMethod $method): bool
|
125 | 98 | {
|
126 | 99 | return $this->set($method);
|
127 | 100 | }
|
128 | 101 |
|
129 | 102 | /**
|
130 |
| - * @param SetChatPermissionsMethod $method |
131 |
| - * |
132 | 103 | * @throws ResponseException
|
133 |
| - * |
134 |
| - * @return bool |
135 | 104 | */
|
136 | 105 | public function setChatPermissions(SetChatPermissionsMethod $method): bool
|
137 | 106 | {
|
|
0 commit comments