Completed
Push — master ( 315749...e0be30 )
by Алексей
03:54
created
src/Config/FileConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __construct($path)
24 24
     {
25
-        $this->path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
25
+        $this->path = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
26 26
     }
27 27
 
28 28
     public function getValue($chatId, $value, $default)
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     private function getFileName($chatId)
46 46
     {
47
-        return $this->path . 'c' . $chatId;
47
+        return $this->path.'c'.$chatId;
48 48
     }
49 49
 
50 50
     public function setValue($chatId, $key, $value)
Please login to merge, or discard this patch.
src/Bot.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         if (!$this->token) {
45 45
             throw new TelegramCoreException('Token must be defined');
46 46
         }
47
-        $baseOptions  = [
47
+        $baseOptions = [
48 48
             'base_uri'    => sprintf('https://api.telegram.org/bot%s/', $token),
49 49
             'verify'      => false,
50 50
             'http_errors' => false,
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $json = \GuzzleHttp\json_decode($response->getBody()->getContents(), true);
79 79
         if (array_get($json, 'ok') == false) {
80
-            throw new TelegramCoreException(array_get($json, 'description', 'error') . array_get($json, 'error_code'), array_get($json, 'error_code'));
80
+            throw new TelegramCoreException(array_get($json, 'description', 'error').array_get($json, 'error_code'), array_get($json, 'error_code'));
81 81
         }
82 82
 
83 83
         return $json;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 use GuzzleHttp\Client;
13 13
 use Psr\Http\Message\ResponseInterface;
14
-use Telegram\Config\BaseConfig;
15 14
 use Telegram\Entry\MessageEntry;
16 15
 use Telegram\Exceptions\TelegramCoreException;
17 16
 use Telegram\Types\User;
Please login to merge, or discard this patch.
src/Base/BaseType.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $map = $this->map;
50 50
 
51 51
         return collect($attributes)
52
-            ->mapWithKeys(function ($item, $key) use ($map) {
52
+            ->mapWithKeys(function($item, $key) use ($map) {
53 53
                 $keyData = array_get($map, $key);
54 54
                 if (is_callable($keyData)) {
55 55
                     return [$key => call_user_func($keyData, $item)];
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function toArray()
82 82
     {
83 83
         return $this->attributes
84
-            ->mapWithKeys(function ($item, $key) {
84
+            ->mapWithKeys(function($item, $key) {
85 85
                 if (is_subclass_of($item, BaseType::class)) {
86 86
                     /** @var BaseType $item */
87 87
                     return [$key => $item->toArray()];
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -73,6 +73,9 @@
 block discarded – undo
73 73
         return new static(is_array($json) ? $json : json_decode($json, true));
74 74
     }
75 75
 
76
+    /**
77
+     * @param string $key
78
+     */
76 79
     public function get($key)
77 80
     {
78 81
         return $this->attributes->get($key);
Please login to merge, or discard this patch.
src/Entry/InlineKeyboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         return $keyboard;
40 40
     }
41 41
 
42
-    public function toArray(){
42
+    public function toArray() {
43 43
         return $this->rows->toArray();
44 44
     }
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
src/Entry/MessageEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         return $this->set('inline_keyboard', $keyboard->toArray());
34 34
     }
35 35
 
36
-    public function text($text){
36
+    public function text($text) {
37 37
         return $this->set('text', $text);
38 38
     }
39 39
 
Please login to merge, or discard this patch.
src/Base/ArrayOfBaseType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $baseType    = $this->baseType;
30 30
         $this->array = collect($array)
31
-            ->map(function ($item) use ($baseType) {
31
+            ->map(function($item) use ($baseType) {
32 32
                 return new BaseType($item);
33 33
             });
34 34
     }
Please login to merge, or discard this patch.