Skip to content

Commit 127ee68

Browse files
author
Masiukevich Maksim
committed
fix code style
1 parent 579979b commit 127ee68

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

tests/Interaction/InteractionsProviderTest.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function tearDown(): void
5353
public function unknownMethod(): void
5454
{
5555
Loop::run(
56-
function(): \Generator
56+
function (): \Generator
5757
{
5858
/** @var \ServiceBus\TelegramBot\Interaction\Result\Fail $result */
5959
$result = yield (new InteractionsProvider(TestHttpClient::create('{}', 404)))->call(
@@ -73,7 +73,7 @@ function(): \Generator
7373
public function validationFailed(): void
7474
{
7575
Loop::run(
76-
function(): \Generator
76+
function (): \Generator
7777
{
7878
/** @var \ServiceBus\TelegramBot\Interaction\Result\Fail $result */
7979
$result = yield (new InteractionsProvider(TestHttpClient::create('{}', 404)))->call(
@@ -95,7 +95,7 @@ function(): \Generator
9595
public function internalError(): void
9696
{
9797
Loop::run(
98-
function(): \Generator
98+
function (): \Generator
9999
{
100100
/** @var \ServiceBus\TelegramBot\Interaction\Result\Fail $result */
101101
$result = yield (new InteractionsProvider(TestHttpClient::create('{}', 500)))->call(
@@ -117,7 +117,7 @@ function(): \Generator
117117
public function incorrectResponsePayload(): void
118118
{
119119
Loop::run(
120-
function(): \Generator
120+
function (): \Generator
121121
{
122122
/** @var \ServiceBus\TelegramBot\Interaction\Result\Fail $result */
123123
$result = yield (new InteractionsProvider(TestHttpClient::create('{}', 200)))->call(
@@ -139,7 +139,7 @@ function(): \Generator
139139
public function successRequest(): void
140140
{
141141
Loop::run(
142-
function(): \Generator
142+
function (): \Generator
143143
{
144144
$expectedResponse = '{"ok":true,"result":{"id":1,"is_bot":true,"first_name":"First","last_name":"","username":"User"}}';
145145

@@ -167,7 +167,7 @@ function(): \Generator
167167
public function failedDownload(): void
168168
{
169169
Loop::run(
170-
function(): \Generator
170+
function (): \Generator
171171
{
172172
/** @var \ServiceBus\TelegramBot\Interaction\Result\Fail $result */
173173
$result = yield (new InteractionsProvider(TestHttpClient::failed('fail message')))->call(
@@ -189,7 +189,7 @@ function(): \Generator
189189
public function successDownload(): void
190190
{
191191
Loop::run(
192-
function(): \Generator
192+
function (): \Generator
193193
{
194194
/** @var \ServiceBus\TelegramBot\Interaction\Result\Success $result */
195195
$result = yield (new InteractionsProvider(TestHttpClient::create('', 200)))->call(

tests/Interaction/TestHttpClient.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,14 @@ public function execute(HttpRequest $requestData, ?RequestContext $context = nul
6565
return $this->expectedFailMessage === null
6666
? new Success(new Psr7Response($this->expectedStatusCode, [], $this->expectedPayload))
6767
: new Failure(new HttpClientException($this->expectedFailMessage));
68-
6968
}
7069

7170
public function download(
7271
string $fileUrl,
7372
string $destinationDirectory,
7473
string $fileName,
7574
?RequestContext $context = null
76-
): Promise
77-
{
75+
): Promise {
7876
return $this->expectedFailMessage === null
7977
? new Success(__FILE__)
8078
: new Failure(new HttpClientException($this->expectedFailMessage));

0 commit comments

Comments
 (0)