Skip to content

Commit

Permalink
Run php-cs-fixer 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcole1340 committed Aug 30, 2021
1 parent b6b9598 commit 80254f0
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 34 deletions.
1 change: 0 additions & 1 deletion src/Discord/DiscordCommandClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Discord;

use Discord\Builders\MessageBuilder;
use Discord\CommandClient\Command;
use Discord\Parts\Embed\Embed;
use Symfony\Component\OptionsResolver\OptionsResolver;
Expand Down
12 changes: 5 additions & 7 deletions src/Discord/Parts/Channel/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use Carbon\Carbon;
use Discord\Builders\MessageBuilder;
use Discord\Exceptions\FileNotFoundException;
use Discord\Exceptions\InvalidOverwriteException;
use Discord\Helpers\Collection;
use Discord\Parts\Embed\Embed;
Expand All @@ -30,7 +29,6 @@
use Discord\Repository\Channel\WebhookRepository;
use Discord\WebSockets\Event;
use Discord\Helpers\Deferred;
use Discord\Helpers\Multipart;
use Discord\Http\Endpoint;
use Discord\Http\Exceptions\NoPermissionsException;
use Discord\Parts\Thread\Thread;
Expand Down Expand Up @@ -323,7 +321,7 @@ public function setOverwrite(Part $part, Overwrite $overwrite): ExtendedPromiseI
* @param string $id The message snowflake.
*
* @deprecated 7.0.0 Use `$message->messages->fetch($id)`.
*
*
* @return ExtendedPromiseInterface
*/
public function getMessage(string $id): ExtendedPromiseInterface
Expand Down Expand Up @@ -768,9 +766,9 @@ private function _sendMessage(MessageBuilder $message): ExtendedPromiseInterface
/**
* Edit a message in the channel.
*
* @param Message $message The message to update.
* @param Message $message The message to update.
* @param MessageBuilder $message Contains the new contents of the message. Note that fields not specified in the builder will not be overwritten.
*
*
* @deprecated 7.0.0 Use `Message::edit` instead
*
* @return ExtendedPromiseInterface<Message>
Expand All @@ -784,7 +782,7 @@ public function editMessage(Message $message, MessageBuilder $builder): Extended
* Sends an embed to the channel.
*
* @param Embed $embed Embed to send.
*
*
* @return ExtendedPromiseInterface<Message>
*/
public function sendEmbed(Embed $embed): ExtendedPromiseInterface
Expand All @@ -802,7 +800,7 @@ public function sendEmbed(Embed $embed): ExtendedPromiseInterface
* @param bool $tts Whether to send the message with TTS.
*
* @deprecated 7.0.0 Use `Channel::sendMessage` to send files.
*
*
* @return ExtendedPromiseInterface<Message>
*/
public function sendFile(string $filepath, ?string $filename = null, ?string $content = null, bool $tts = false): ExtendedPromiseInterface
Expand Down
4 changes: 2 additions & 2 deletions src/Discord/Parts/Channel/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ protected function getUserIdAttribute(): ?string
* Returns the author attribute.
*
* @return User|Member|null The member that sent the message. Will return a User object if it is a PM.
*
*
* @deprecated 6.0.0 Use `Message::member` or `Message:user` instead.
*/
protected function getAuthorAttribute(): ?Part
Expand Down Expand Up @@ -636,7 +636,7 @@ public function deleteReaction(int $type, $emoticon = null, ?string $id = null):
* Edits the message.
*
* @param MessageBuilder $message Contains the new contents of the message. Note that fields not specified in the builder will not be overwritten.
*
*
* @return ExtendedPromiseInterface<Message>
*/
public function edit(MessageBuilder $message): ExtendedPromiseInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Discord/Parts/Thread/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class Member extends Part
{
/**
* {@inheritdoc}
* @inheritdoc
*/
protected $fillable = ['id', 'user_id', 'flags', 'join_timestamp'];

Expand Down
12 changes: 5 additions & 7 deletions src/Discord/Parts/Thread/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@

use Carbon\Carbon;
use Discord\Builders\MessageBuilder;
use Discord\Exceptions\FileNotFoundException;
use Discord\Helpers\Collection;
use Discord\Helpers\Deferred;
use Discord\Helpers\Multipart;
use Discord\Http\Endpoint;
use Discord\Parts\Channel\Channel;
use Discord\Parts\Channel\Message;
Expand Down Expand Up @@ -63,7 +61,7 @@
class Thread extends Part
{
/**
* {@inheritdoc}
* @inheritdoc
*/
protected $fillable = [
'id',
Expand All @@ -80,7 +78,7 @@ class Thread extends Part
];

/**
* {@inheritdoc}
* @inheritdoc
*/
protected $visible = [
'guild',
Expand All @@ -97,7 +95,7 @@ class Thread extends Part
];

/**
* {@inheritdoc}
* @inheritdoc
*/
protected $repositories = [
'messages' => MessageRepository::class,
Expand Down Expand Up @@ -506,7 +504,7 @@ private function _sendMessage(MessageBuilder $message): ExtendedPromiseInterface
* Sends an embed to the thread.
*
* @param Embed $embed Embed to send.
*
*
* @return ExtendedPromiseInterface<Message>
*/
public function sendEmbed(Embed $embed): ExtendedPromiseInterface
Expand Down Expand Up @@ -571,7 +569,7 @@ public function createMessageCollector(callable $filter, array $options = []): E
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getRepositoryAttributes(): array
{
Expand Down
1 change: 0 additions & 1 deletion src/Discord/Parts/User/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Discord\Http\Endpoint;
use Discord\Parts\Channel\Channel;
use Discord\Parts\Channel\Overwrite;
use Discord\Parts\Embed\Embed;
use Discord\Parts\Guild\Guild;
use Discord\Parts\Guild\Role;
use Discord\Parts\Part;
Expand Down
1 change: 0 additions & 1 deletion src/Discord/Parts/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Discord\Builders\MessageBuilder;
use Discord\Http\Endpoint;
use Discord\Parts\Channel\Channel;
use Discord\Parts\Embed\Embed;
use Discord\Parts\Part;
use Discord\Parts\Channel\Message;
use React\Promise\ExtendedPromiseInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Discord/Parts/WebSockets/MessageReaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MessageReaction extends Part
protected $visible = ['user', 'message', 'member', 'channel', 'guild'];

/**
* {@inheritdoc}
* @inheritdoc
*/
public function isPartial(): bool
{
Expand Down
2 changes: 1 addition & 1 deletion src/Discord/Parts/WebSockets/TypingStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class TypingStart extends Part
protected $fillable = ['user_id', 'timestamp', 'channel_id', 'guild_id', 'member'];

/**
* {@inheritdoc}
* @inheritdoc
*/
protected $visible = ['user', 'channel', 'guild', 'member'];

Expand Down
4 changes: 2 additions & 2 deletions src/Discord/Repository/Channel/ThreadRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class ThreadRepository extends AbstractRepository
{
/**
* {@inheritdoc}
* @inheritdoc
*/
protected $endpoints = [
'all' => Endpoint::CHANNEL_THREADS_ACTIVE,
Expand All @@ -40,7 +40,7 @@ class ThreadRepository extends AbstractRepository
];

/**
* {@inheritdoc}
* @inheritdoc
*/
protected $class = Thread::class;

Expand Down
6 changes: 3 additions & 3 deletions src/Discord/Repository/Thread/MemberRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
class MemberRepository extends AbstractRepository
{
/**
* {@inheritdoc}
* @inheritdoc
*/
protected $discrim = 'user_id';

/**
* {@inheritdoc}
* @inheritdoc
*/
protected $endpoints = [
'all' => Endpoint::THREAD_MEMBERS,
];

/**
* {@inheritdoc}
* @inheritdoc
*/
protected $class = Member::class;
}
12 changes: 6 additions & 6 deletions src/Discord/WebSockets/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ abstract class Event
public const CHANNEL_PINS_UPDATE = 'CHANNEL_PINS_UPDATE';

// Threads
const THREAD_CREATE = 'THREAD_CREATE';
const THREAD_UPDATE = 'THREAD_UPDATE';
const THREAD_DELETE = 'THREAD_DELETE';
const THREAD_LIST_SYNC = 'THREAD_LIST_SYNC';
const THREAD_MEMBER_UPDATE = 'THREAD_MEMBER_UPDATE';
const THREAD_MEMBERS_UPDATE = 'THREAD_MEMBERS_UPDATE';
public const THREAD_CREATE = 'THREAD_CREATE';
public const THREAD_UPDATE = 'THREAD_UPDATE';
public const THREAD_DELETE = 'THREAD_DELETE';
public const THREAD_LIST_SYNC = 'THREAD_LIST_SYNC';
public const THREAD_MEMBER_UPDATE = 'THREAD_MEMBER_UPDATE';
public const THREAD_MEMBERS_UPDATE = 'THREAD_MEMBERS_UPDATE';

// Messages
public const MESSAGE_CREATE = 'MESSAGE_CREATE';
Expand Down
2 changes: 1 addition & 1 deletion src/Discord/WebSockets/Events/ThreadCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class ThreadCreate extends Event
{
/**
* {@inheritdoc}
* @inheritdoc
*/
public function handle(Deferred &$deferred, $data)
{
Expand Down

0 comments on commit 80254f0

Please sign in to comment.