Completed
Push — master ( e0be30...eaeab3 )
by Алексей
05:57
created
src/Bot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Entry/KeyboardButtonEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Entry/ReplyKeyboardEntry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,10 +77,10 @@
 block discarded – undo
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
                     ];
Please login to merge, or discard this patch.
src/Base/BaseEntry.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,10 +38,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.