@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function addResult(array $result) : int |
| 129 | 129 | { |
| 130 | - if (array_key_exists('type', $result) && ! in_array($result['type'], $this->accepted_type)) { |
|
| 130 | + if (array_key_exists('type', $result) && !in_array($result['type'], $this->accepted_type)) { |
|
| 131 | 131 | throw new BotException("Result has wrong or no type at all. Check that the result has a value of key 'type' that correspond to a type in the API Reference"); |
| 132 | 132 | } |
| 133 | 133 | |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | 'disable_web_page_preview' => $disable_web_preview |
| 172 | 172 | ]); |
| 173 | 173 | |
| 174 | - if ( is_null($reply_markup) ) { |
|
| 175 | - unset( $this->results[ $this->id_result ]['reply_markup'] ); |
|
| 174 | + if (is_null($reply_markup)) { |
|
| 175 | + unset($this->results[$this->id_result]['reply_markup']); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return $this->id_result++; |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | |
| 53 | 53 | foreach ($this->_commands as $index => $array) { |
| 54 | 54 | // Sort them by priority |
| 55 | - uasort($this->_commands[$index], function ($array, $b) { |
|
| 55 | + uasort($this->_commands[$index], function($array, $b) { |
|
| 56 | 56 | return $a::$priority <=> $b::$priority; |
| 57 | 57 | }); |
| 58 | 58 | } |