@@ 154-165 (lines=12) @@ | ||
151 | }; |
|
152 | } |
|
153 | ||
154 | protected static function getInlineQueryEvent(Closure $action) |
|
155 | { |
|
156 | return function (Update $update) use ($action) { |
|
157 | if (!$update->getInlineQuery()) { |
|
158 | return true; |
|
159 | } |
|
160 | ||
161 | $reflectionAction = new ReflectionFunction($action); |
|
162 | $reflectionAction->invokeArgs([$update->getInlineQuery()]); |
|
163 | return false; |
|
164 | }; |
|
165 | } |
|
166 | ||
167 | protected static function getShippingQueryEvent(Closure $action) |
|
168 | { |
|
@@ 167-178 (lines=12) @@ | ||
164 | }; |
|
165 | } |
|
166 | ||
167 | protected static function getShippingQueryEvent(Closure $action) |
|
168 | { |
|
169 | return function (Update $update) use ($action) { |
|
170 | if (!$update->getShippingQuery()) { |
|
171 | return true; |
|
172 | } |
|
173 | ||
174 | $reflectionAction = new ReflectionFunction($action); |
|
175 | $reflectionAction->invokeArgs([$update->getShippingQuery()]); |
|
176 | return false; |
|
177 | }; |
|
178 | } |
|
179 | ||
180 | protected static function getPreCheckoutQueryEvent(Closure $action) |
|
181 | { |
|
@@ 180-191 (lines=12) @@ | ||
177 | }; |
|
178 | } |
|
179 | ||
180 | protected static function getPreCheckoutQueryEvent(Closure $action) |
|
181 | { |
|
182 | return function (Update $update) use ($action) { |
|
183 | if (!$update->getPreCheckoutQuery()) { |
|
184 | return true; |
|
185 | } |
|
186 | ||
187 | $reflectionAction = new ReflectionFunction($action); |
|
188 | $reflectionAction->invokeArgs([$update->getPreCheckoutQuery()]); |
|
189 | return false; |
|
190 | }; |
|
191 | } |
|
192 | ||
193 | /** |
|
194 | * Returns check function to handling the command. |