Skip to content

Commit 1a6262c

Browse files
committed
code style changes
1 parent cb9a9fd commit 1a6262c

19 files changed

+28
-28
lines changed

.php_cs.cache

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/Api/Method/InlineQuery/AnswerInlineQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
namespace ServiceBus\TelegramBot\Api\Method\InlineQuery;
1414

15+
use function ServiceBus\Common\jsonEncode;
1516
use ServiceBus\TelegramBot\Api\Type\InlineQueryResult\InlineQueryResult;
1617
use ServiceBus\TelegramBot\Api\Type\SimpleSuccessResponse;
1718
use ServiceBus\TelegramBot\Interaction\TelegramMethod;
18-
use function ServiceBus\Common\jsonEncode;
1919

2020
/**
2121
* Send answers to an inline query. No more than 50 results per query are allowed.

src/Api/Method/Location/EditMessageLiveLocation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
namespace ServiceBus\TelegramBot\Api\Method\Location;
1414

15+
use function ServiceBus\Common\jsonEncode;
1516
use ServiceBus\TelegramBot\Api\Type\Chat\ChatId;
1617
use ServiceBus\TelegramBot\Api\Type\Keyboard\InlineKeyboardMarkup;
1718
use ServiceBus\TelegramBot\Api\Type\Location\Location;
1819
use ServiceBus\TelegramBot\Api\Type\Message\InlineMessageId;
1920
use ServiceBus\TelegramBot\Api\Type\Message\Message;
2021
use ServiceBus\TelegramBot\Api\Type\Message\MessageId;
2122
use ServiceBus\TelegramBot\Interaction\TelegramMethod;
22-
use function ServiceBus\Common\jsonEncode;
2323

2424
/**
2525
* Edit live location messages. A location can be edited until its live_period expires or editing is explicitly

src/Api/Method/Location/StopMessageLiveLocation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
namespace ServiceBus\TelegramBot\Api\Method\Location;
1414

15+
use function ServiceBus\Common\jsonEncode;
1516
use ServiceBus\TelegramBot\Api\Type\Chat\ChatId;
1617
use ServiceBus\TelegramBot\Api\Type\Keyboard\InlineKeyboardMarkup;
1718
use ServiceBus\TelegramBot\Api\Type\Message\InlineMessageId;
1819
use ServiceBus\TelegramBot\Api\Type\Message\Message;
1920
use ServiceBus\TelegramBot\Api\Type\Message\MessageId;
2021
use ServiceBus\TelegramBot\Interaction\TelegramMethod;
21-
use function ServiceBus\Common\jsonEncode;
2222

2323
/**
2424
* Stop updating a live location message before live_period expires.

src/Api/Method/Message/SendMediaGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
namespace ServiceBus\TelegramBot\Api\Method\Message;
1414

15+
use function ServiceBus\Common\jsonEncode;
1516
use ServiceBus\TelegramBot\Api\Type\Chat\ChatId;
1617
use ServiceBus\TelegramBot\Api\Type\InputMedia\InputMedia;
1718
use ServiceBus\TelegramBot\Api\Type\Message\Message;
1819
use ServiceBus\TelegramBot\Api\Type\Message\MessageId;
1920
use ServiceBus\TelegramBot\Interaction\TelegramMethod;
20-
use function ServiceBus\Common\jsonEncode;
2121

2222
/**
2323
* Send a group of photos or videos as an album.

src/Api/Method/Poll/SendPoll.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
namespace ServiceBus\TelegramBot\Api\Method\Poll;
1414

15+
use function ServiceBus\Common\jsonEncode;
1516
use ServiceBus\TelegramBot\Api\Method\SendEntity;
1617
use ServiceBus\TelegramBot\Api\Type\Chat\ChatId;
17-
use function ServiceBus\Common\jsonEncode;
1818

1919
/**
2020
* Send a native poll.

src/Api/Method/SendEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
namespace ServiceBus\TelegramBot\Api\Method;
1414

15+
use function ServiceBus\Common\jsonEncode;
1516
use ServiceBus\TelegramBot\Api\Type\Chat\ChatId;
1617
use ServiceBus\TelegramBot\Api\Type\Message\Message;
1718
use ServiceBus\TelegramBot\Api\Type\Message\MessageId;
1819
use ServiceBus\TelegramBot\Api\Type\ReplayMarkup;
1920
use ServiceBus\TelegramBot\Interaction\TelegramMethod;
20-
use function ServiceBus\Common\jsonEncode;
2121

2222
/**
2323
*

src/Api/Type/Message/Message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ final class Message
392392

393393
public function isCommand(): bool
394394
{
395-
foreach($this->entities as $entity)
395+
foreach ($this->entities as $entity)
396396
{
397-
if($entity->isCommand() === true)
397+
if (true === $entity->isCommand())
398398
{
399399
return true;
400400
}

src/Interaction/InteractionsProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace ServiceBus\TelegramBot\Interaction;
1414

1515
use function Amp\call;
16+
use function ServiceBus\Common\jsonDecode;
1617
use Amp\Promise;
1718
use Doctrine\Common\Annotations\AnnotationReader;
1819
use Doctrine\Common\Annotations\AnnotationRegistry;
@@ -28,7 +29,6 @@
2829
use ServiceBus\TelegramBot\TelegramCredentials;
2930
use Symfony\Component\Validator\Validator\ValidatorInterface;
3031
use Symfony\Component\Validator\ValidatorBuilder;
31-
use function ServiceBus\Common\jsonDecode;
3232

3333
/**
3434
*

src/Serializer/Normalizers/ChatIdNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function supportsNormalization($data, string $format = null): bool
4949
*/
5050
public function denormalize($data, string $type, string $format = null, array $context = []): ?ChatId
5151
{
52-
if('' !== (string) $data)
52+
if ('' !== (string) $data)
5353
{
5454
return new ChatId((string) $data);
5555
}

0 commit comments

Comments
 (0)