Skip to content

Commit

Permalink
Format code by the latest cs-fixer. (#6617)
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo authored Mar 23, 2024
1 parent 0a914e6 commit 33086e9
Show file tree
Hide file tree
Showing 67 changed files with 82 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/AMQPConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

use Hyperf\Amqp\Exception\LoopBrokenException;
Expand Down
1 change: 1 addition & 0 deletions src/Annotation/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Annotation;

use Attribute;
Expand Down
1 change: 1 addition & 0 deletions src/Annotation/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Annotation;

use Attribute;
Expand Down
1 change: 1 addition & 0 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

use Hyperf\Amqp\Message\MessageInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Builder/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Builder;

use PhpAmqpLib\Wire\AMQPTable;
Expand Down
5 changes: 3 additions & 2 deletions src/Builder/ExchangeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Builder;

use Hyperf\Amqp\Message\Type;
Expand All @@ -32,7 +33,7 @@ public function setExchange(string $exchange): static
return $this;
}

public function getType(): Type|string
public function getType(): string|Type
{
return $this->type;
}
Expand All @@ -42,7 +43,7 @@ public function getTypeString(): string
return $this->type instanceof Type ? $this->type->value : $this->type;
}

public function setType(Type|string $type): static
public function setType(string|Type $type): static
{
$this->type = $type;
return $this;
Expand Down
1 change: 1 addition & 0 deletions src/Builder/QueueBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Builder;

use PhpAmqpLib\Wire\AMQPTable;
Expand Down
1 change: 1 addition & 0 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

use Hyperf\Amqp\Listener\BeforeMainServerStartListener;
Expand Down
1 change: 1 addition & 0 deletions src/ConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

use Hyperf\Amqp\Exception\NotSupportedException;
Expand Down
1 change: 1 addition & 0 deletions src/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

class Constants
Expand Down
1 change: 1 addition & 0 deletions src/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

use Hyperf\Amqp\Event\AfterConsume;
Expand Down
1 change: 1 addition & 0 deletions src/ConsumerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

use Hyperf\Contract\StdoutLoggerInterface;
Expand Down
1 change: 1 addition & 0 deletions src/ConsumerManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp;

use Hyperf\Amqp\Annotation\Consumer as ConsumerAnnotation;
Expand Down
1 change: 1 addition & 0 deletions src/Event/AfterConsume.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Event;

use Hyperf\Amqp\Message\ConsumerMessageInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Event/BeforeConsume.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Event;

use Hyperf\Amqp\Message\ConsumerMessageInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Event/ConsumeEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Event;

use Hyperf\Amqp\Message\ConsumerMessageInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Event/FailToConsume.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Event;

use Hyperf\Amqp\Message\ConsumerMessageInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Event/WaitTimeout.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Event;

class WaitTimeout extends ConsumeEvent
Expand Down
1 change: 1 addition & 0 deletions src/Exception/LoopBrokenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/MaxConsumptionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Exception;

use Exception;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/MessageException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Exception;

use Exception;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/NotSupportedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/SendChannelClosedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/SendChannelTimeoutException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/TimeoutException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/IO/IOFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\IO;

use Hyperf\Amqp\Exception\NotSupportedException;
Expand Down
1 change: 1 addition & 0 deletions src/IO/IOFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\IO;

use Hyperf\Amqp\Params;
Expand Down
1 change: 1 addition & 0 deletions src/IO/SwooleIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\IO;

use InvalidArgumentException;
Expand Down
1 change: 1 addition & 0 deletions src/IO/SwowIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\IO;

use Hyperf\Engine\Socket;
Expand Down
1 change: 1 addition & 0 deletions src/Listener/BeforeMainServerStartListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Listener;

use Hyperf\Amqp\ConsumerManager;
Expand Down
1 change: 1 addition & 0 deletions src/Listener/MainWorkerStartListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Listener;

use Doctrine\Instantiator\Instantiator;
Expand Down
1 change: 1 addition & 0 deletions src/Message/ConsumerDelayedMessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

use Hyperf\Amqp\Builder\QueueBuilder;
Expand Down
7 changes: 4 additions & 3 deletions src/Message/ConsumerMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

use Hyperf\Amqp\Builder\QueueBuilder;
Expand Down Expand Up @@ -38,7 +39,7 @@ abstract class ConsumerMessage extends Message implements ConsumerMessageInterfa

protected int $maxConsumption = 0;

protected int|float $waitTimeout = 0;
protected float|int $waitTimeout = 0;

protected int $nums = 1;

Expand Down Expand Up @@ -113,12 +114,12 @@ public function setMaxConsumption(int $maxConsumption): static
return $this;
}

public function getWaitTimeout(): int|float
public function getWaitTimeout(): float|int
{
return $this->waitTimeout;
}

public function setWaitTimeout(int|float $timeout): static
public function setWaitTimeout(float|int $timeout): static
{
$this->waitTimeout = $timeout;
return $this;
Expand Down
5 changes: 3 additions & 2 deletions src/Message/ConsumerMessageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

use Hyperf\Amqp\Builder\QueueBuilder;
Expand Down Expand Up @@ -40,9 +41,9 @@ public function getMaxConsumption(): int;

public function setMaxConsumption(int $maxConsumption): static;

public function getWaitTimeout(): int|float;
public function getWaitTimeout(): float|int;

public function setWaitTimeout(int|float $timeout): static;
public function setWaitTimeout(float|int $timeout): static;

public function setNums(int $nums): static;

Expand Down
1 change: 1 addition & 0 deletions src/Message/DynamicRpcMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

class DynamicRpcMessage extends RpcMessage
Expand Down
7 changes: 4 additions & 3 deletions src/Message/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

use Hyperf\Amqp\Builder\ExchangeBuilder;
Expand All @@ -20,17 +21,17 @@ abstract class Message implements MessageInterface

protected string $exchange = '';

protected Type|string $type = Type::TOPIC;
protected string|Type $type = Type::TOPIC;

protected array|string $routingKey = '';

public function setType(Type|string $type): static
public function setType(string|Type $type): static
{
$this->type = $type;
return $this;
}

public function getType(): Type|string
public function getType(): string|Type
{
return $this->type;
}
Expand Down
5 changes: 3 additions & 2 deletions src/Message/MessageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

use Hyperf\Amqp\Builder\ExchangeBuilder;
Expand All @@ -22,9 +23,9 @@ public function setPoolName(string $name);
*/
public function getPoolName(): string;

public function setType(Type|string $type);
public function setType(string|Type $type);

public function getType(): Type|string;
public function getType(): string|Type;

public function setExchange(string $exchange);

Expand Down
1 change: 1 addition & 0 deletions src/Message/ProducerDelayedMessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

use Hyperf\Amqp\Builder\ExchangeBuilder;
Expand Down
1 change: 1 addition & 0 deletions src/Message/ProducerMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Amqp\Message;

use Hyperf\Amqp\Constants;
Expand Down
Loading

0 comments on commit 33086e9

Please sign in to comment.