Skip to content

Commit fe9d61a

Browse files
committed
Running php-cs-fixer
Running php-cs-fixer to fix CS drift
1 parent 238ca20 commit fe9d61a

13 files changed

+10
-61
lines changed

Diff for: GearmanConsumer.php

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class GearmanConsumer implements Consumer
2727

2828
/**
2929
* Message content.
30-
*
31-
* @var mixed
3230
*/
3331
private $message;
3432

Diff for: GearmanMessage.php

+7-11
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function setRedelivered(bool $redelivered): void
101101
$this->redelivered = $redelivered;
102102
}
103103

104-
public function setCorrelationId(string $correlationId = null): void
104+
public function setCorrelationId(?string $correlationId = null): void
105105
{
106106
$this->setHeader('correlation_id', (string) $correlationId);
107107
}
@@ -111,7 +111,7 @@ public function getCorrelationId(): ?string
111111
return $this->getHeader('correlation_id');
112112
}
113113

114-
public function setMessageId(string $messageId = null): void
114+
public function setMessageId(?string $messageId = null): void
115115
{
116116
$this->setHeader('message_id', (string) $messageId);
117117
}
@@ -128,12 +128,12 @@ public function getTimestamp(): ?int
128128
return null === $value ? null : (int) $value;
129129
}
130130

131-
public function setTimestamp(int $timestamp = null): void
131+
public function setTimestamp(?int $timestamp = null): void
132132
{
133133
$this->setHeader('timestamp', $timestamp);
134134
}
135135

136-
public function setReplyTo(string $replyTo = null): void
136+
public function setReplyTo(?string $replyTo = null): void
137137
{
138138
$this->setHeader('reply_to', $replyTo);
139139
}
@@ -155,12 +155,8 @@ public function jsonSerialize(): array
155155
public static function jsonUnserialize(string $json): self
156156
{
157157
$data = json_decode($json, true);
158-
if (JSON_ERROR_NONE !== json_last_error()) {
159-
throw new \InvalidArgumentException(sprintf(
160-
'The malformed json given. Error %s and message %s',
161-
json_last_error(),
162-
json_last_error_msg()
163-
));
158+
if (\JSON_ERROR_NONE !== json_last_error()) {
159+
throw new \InvalidArgumentException(sprintf('The malformed json given. Error %s and message %s', json_last_error(), json_last_error_msg()));
164160
}
165161

166162
return new self($data['body'], $data['properties'], $data['headers']);
@@ -171,7 +167,7 @@ public function getJob(): ?\GearmanJob
171167
return $this->job;
172168
}
173169

174-
public function setJob(\GearmanJob $job = null): void
170+
public function setJob(?\GearmanJob $job = null): void
175171
{
176172
$this->job = $job;
177173
}

Diff for: GearmanProducer.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function send(Destination $destination, Message $message): void
4040
}
4141
}
4242

43-
public function setDeliveryDelay(int $deliveryDelay = null): Producer
43+
public function setDeliveryDelay(?int $deliveryDelay = null): Producer
4444
{
4545
if (null === $deliveryDelay) {
4646
return $this;
@@ -54,7 +54,7 @@ public function getDeliveryDelay(): ?int
5454
return null;
5555
}
5656

57-
public function setPriority(int $priority = null): Producer
57+
public function setPriority(?int $priority = null): Producer
5858
{
5959
if (null === $priority) {
6060
return $this;
@@ -68,7 +68,7 @@ public function getPriority(): ?int
6868
return null;
6969
}
7070

71-
public function setTimeToLive(int $timeToLive = null): Producer
71+
public function setTimeToLive(?int $timeToLive = null): Producer
7272
{
7373
if (null === $timeToLive) {
7474
return $this;

Diff for: Tests/GearmanConnectionFactoryConfigTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ public function testThrowIfDsnCouldNotBeParsed()
4242

4343
/**
4444
* @dataProvider provideConfigs
45-
*
46-
* @param mixed $config
47-
* @param mixed $expectedConfig
4845
*/
4946
public function testShouldParseConfigurationAsExpected($config, $expectedConfig)
5047
{

Diff for: Tests/Spec/GearmanConnectionFactoryTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ class GearmanConnectionFactoryTest extends ConnectionFactorySpec
1010
{
1111
use SkipIfGearmanExtensionIsNotInstalledTrait;
1212

13-
/**
14-
* {@inheritdoc}
15-
*/
1613
protected function createConnectionFactory()
1714
{
1815
return new GearmanConnectionFactory();

Diff for: Tests/Spec/GearmanContextTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
*/
1212
class GearmanContextTest extends ContextSpec
1313
{
14-
/**
15-
* {@inheritdoc}
16-
*/
1714
protected function createContext()
1815
{
1916
return (new GearmanConnectionFactory(getenv('GEARMAN_DSN')))->createContext();

Diff for: Tests/Spec/GearmanMessageTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ class GearmanMessageTest extends MessageSpec
1010
{
1111
use SkipIfGearmanExtensionIsNotInstalledTrait;
1212

13-
/**
14-
* {@inheritdoc}
15-
*/
1613
protected function createMessage()
1714
{
1815
return new GearmanMessage();

Diff for: Tests/Spec/GearmanQueueTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ class GearmanQueueTest extends QueueSpec
1010
{
1111
use SkipIfGearmanExtensionIsNotInstalledTrait;
1212

13-
/**
14-
* {@inheritdoc}
15-
*/
1613
protected function createQueue()
1714
{
1815
return new GearmanDestination(self::EXPECTED_QUEUE_NAME);

Diff for: Tests/Spec/GearmanSendToAndReceiveFromQueueTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
*/
1414
class GearmanSendToAndReceiveFromQueueTest extends SendToAndReceiveFromQueueSpec
1515
{
16-
/**
17-
* {@inheritdoc}
18-
*/
1916
protected function createContext()
2017
{
2118
$factory = new GearmanConnectionFactory(getenv('GEARMAN_DSN'));

Diff for: Tests/Spec/GearmanSendToAndReceiveNoWaitFromQueueTest.php

-6
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@
1212
*/
1313
class GearmanSendToAndReceiveNoWaitFromQueueTest extends SendToAndReceiveNoWaitFromQueueSpec
1414
{
15-
/**
16-
* {@inheritdoc}
17-
*/
1815
protected function createContext()
1916
{
2017
$factory = new GearmanConnectionFactory(getenv('GEARMAN_DSN'));
2118

2219
return $factory->createContext();
2320
}
2421

25-
/**
26-
* {@inheritdoc}
27-
*/
2822
protected function createQueue(Context $context, $queueName)
2923
{
3024
return $context->createQueue($queueName.time());

Diff for: Tests/Spec/GearmanSendToTopicAndReceiveFromQueueTest.php

-9
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,18 @@ protected function setUp(): void
1919
$this->time = time();
2020
}
2121

22-
/**
23-
* {@inheritdoc}
24-
*/
2522
protected function createContext()
2623
{
2724
$factory = new GearmanConnectionFactory(getenv('GEARMAN_DSN'));
2825

2926
return $factory->createContext();
3027
}
3128

32-
/**
33-
* {@inheritdoc}
34-
*/
3529
protected function createQueue(Context $context, $queueName)
3630
{
3731
return $context->createQueue($queueName.$this->time);
3832
}
3933

40-
/**
41-
* {@inheritdoc}
42-
*/
4334
protected function createTopic(Context $context, $topicName)
4435
{
4536
return $context->createTopic($topicName.$this->time);

Diff for: Tests/Spec/GearmanSendToTopicAndReceiveNoWaitFromQueueTest.php

-9
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,18 @@ protected function setUp(): void
1919
$this->time = time();
2020
}
2121

22-
/**
23-
* {@inheritdoc}
24-
*/
2522
protected function createContext()
2623
{
2724
$factory = new GearmanConnectionFactory(getenv('GEARMAN_DSN'));
2825

2926
return $factory->createContext();
3027
}
3128

32-
/**
33-
* {@inheritdoc}
34-
*/
3529
protected function createQueue(Context $context, $queueName)
3630
{
3731
return $context->createQueue($queueName.$this->time);
3832
}
3933

40-
/**
41-
* {@inheritdoc}
42-
*/
4334
protected function createTopic(Context $context, $topicName)
4435
{
4536
return $context->createTopic($topicName.$this->time);

Diff for: Tests/Spec/GearmanTopicTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ class GearmanTopicTest extends TopicSpec
1010
{
1111
use SkipIfGearmanExtensionIsNotInstalledTrait;
1212

13-
/**
14-
* {@inheritdoc}
15-
*/
1613
protected function createTopic()
1714
{
1815
return new GearmanDestination(self::EXPECTED_TOPIC_NAME);

0 commit comments

Comments
 (0)