From 86eb541d66ed2e2e3422065734f09554a1500897 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Wed, 10 Mar 2021 11:07:34 +1000 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BD=D0=B8=D1=87=D1=82=D0=BE=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- hood/vk/system/api/methods/messages.php | 13 ++--- hood/vk/tests/.gitignore | 1 + hood/vk/tests/settings.php.example | 68 +++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 hood/vk/tests/.gitignore create mode 100644 hood/vk/tests/settings.php.example diff --git a/.gitignore b/.gitignore index 76cf2b9..1f75a27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /logs /temp -/vendor -.env \ No newline at end of file +/vendor \ No newline at end of file diff --git a/hood/vk/system/api/methods/messages.php b/hood/vk/system/api/methods/messages.php index 69e37d0..6830b10 100644 --- a/hood/vk/system/api/methods/messages.php +++ b/hood/vk/system/api/methods/messages.php @@ -57,9 +57,9 @@ final class messages extends method /** * Записать текст - * + * * @param string $text Текст - * + * * @return self */ public function text(string $text): self @@ -76,9 +76,9 @@ final class messages extends method /** * Записать фото - * + * * @param $img Фото - * + * * @return self */ public function image(...$imgs): self @@ -98,7 +98,7 @@ final class messages extends method /** * Записать вложение - * + * * @param $attachments Вложения */ public function attachment(string ...$attachments): self @@ -284,6 +284,7 @@ final class messages extends method $this->robot->api['attachment'] = implode(',', $this->attachments); } - return $settings; + // Что это? + return $settings ?? []; } } diff --git a/hood/vk/tests/.gitignore b/hood/vk/tests/.gitignore new file mode 100644 index 0000000..015d18c --- /dev/null +++ b/hood/vk/tests/.gitignore @@ -0,0 +1 @@ +./settings.php \ No newline at end of file diff --git a/hood/vk/tests/settings.php.example b/hood/vk/tests/settings.php.example new file mode 100644 index 0000000..c6d8e48 --- /dev/null +++ b/hood/vk/tests/settings.php.example @@ -0,0 +1,68 @@ +