Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 0 |
1 | <?php |
||
46 | 1 | public function handle(Request $request) |
|
47 | { |
||
48 | 1 | $params = $request->json(); |
|
49 | |||
50 | 1 | $update = new Update($params->all(), $this->app->getBotUsername()); |
|
51 | |||
52 | 1 | if ($response = $this->app->processUpdate($update)) { |
|
53 | 1 | return $response->isOk(); |
|
54 | } |
||
55 | |||
56 | return $response; |
||
57 | } |
||
58 | } |
||
59 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.