@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if (!$this->token) { |
48 | 48 | throw new TelegramCoreException('Token must be defined'); |
49 | 49 | } |
50 | - $baseOptions = [ |
|
50 | + $baseOptions = [ |
|
51 | 51 | 'base_uri' => sprintf('https://api.telegram.org/bot%s/', $token), |
52 | 52 | 'verify' => false, |
53 | 53 | 'http_errors' => false, |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | $json = \GuzzleHttp\json_decode($response->getBody()->getContents(), true); |
82 | 82 | if (array_get($json, 'ok') == false) { |
83 | - throw new TelegramCoreException(array_get($json, 'description', 'error') . array_get($json, 'error_code'), |
|
83 | + throw new TelegramCoreException(array_get($json, 'description', 'error').array_get($json, 'error_code'), |
|
84 | 84 | array_get($json, 'error_code')); |
85 | 85 | } |
86 | 86 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | return $this->set('request_contact', $requestContact); |
42 | 42 | } |
43 | 43 | |
44 | - public function setRequestLocation(bool $requestLocation){ |
|
44 | + public function setRequestLocation(bool $requestLocation) { |
|
45 | 45 | return $this->set('request_contact', $requestLocation); |
46 | 46 | } |
47 | 47 | } |
48 | 48 | \ No newline at end of file |
@@ -77,10 +77,10 @@ |
||
77 | 77 | $clone = clone $this; |
78 | 78 | $rows = $clone |
79 | 79 | ->get(self::KEYBOARD_KEY, collect()) |
80 | - ->mapWithKeys(function ($item, $key) { |
|
80 | + ->mapWithKeys(function($item, $key) { |
|
81 | 81 | return [ |
82 | 82 | $key => collect($item) |
83 | - ->mapWithKeys(function ($item, $key) { |
|
83 | + ->mapWithKeys(function($item, $key) { |
|
84 | 84 | return [$key => $item->toArray()]; |
85 | 85 | }), |
86 | 86 | ]; |
@@ -38,10 +38,9 @@ |
||
38 | 38 | public function toArray() |
39 | 39 | { |
40 | 40 | return $this->attributes |
41 | - ->mapWithKeys(function ($item, $key) { |
|
42 | - return $item instanceof Collection || get_parent_class($item) === BaseEntry::class? |
|
43 | - [$key => $item->toArray()] : |
|
44 | - [$key => $item]; |
|
41 | + ->mapWithKeys(function($item, $key) { |
|
42 | + return $item instanceof Collection || get_parent_class($item) === BaseEntry::class ? |
|
43 | + [$key => $item->toArray()] : [$key => $item]; |
|
45 | 44 | }) |
46 | 45 | ->toArray(); |
47 | 46 | } |