Skip to content

run php-cs-fixer #33

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/amqp-ext/AmqpConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct(array $config)
public function createContext()
{
if ($this->config['lazy']) {
return new AmqpContext(function() {
return new AmqpContext(function () {
return new \AMQPChannel($this->establishConnection());
});
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/amqp-ext/Tests/AmqpConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ public function testShouldCreateLazyContext()
$this->assertInstanceOf(AmqpContext::class, $context);

$this->assertAttributeEquals(null, 'extChannel', $context);
$this->assertTrue(is_callable($this->readAttribute($context, 'extChannelFactory')));
$this->assertInternalType('callable', $this->readAttribute($context, 'extChannelFactory'));
}
}
4 changes: 2 additions & 2 deletions pkg/enqueue/Client/MessageProducer.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private function prepareBody(Message $message)
$body = $message->getBody();
$contentType = $message->getContentType();

if (is_scalar($body) || is_null($body)) {
if (is_scalar($body) || null === $body) {
$contentType = $contentType ?: 'text/plain';
$body = (string) $body;
} elseif (is_array($body)) {
Expand All @@ -68,7 +68,7 @@ private function prepareBody(Message $message)

// only array of scalars is allowed.
array_walk_recursive($body, function ($value) {
if (!is_scalar($value) && !is_null($value)) {
if (!is_scalar($value) && null !== $value) {
throw new \LogicException(sprintf(
'The message\'s body must be an array of scalars. Found not scalar in the array: %s',
is_object($value) ? get_class($value) : gettype($value)
Expand Down
4 changes: 2 additions & 2 deletions pkg/enqueue/Client/SimpleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public function __construct(AmqpContext $context, Config $config = null)
}

/**
* @param string $topic
* @param string $processorName
* @param string $topic
* @param string $processorName
* @param callback $processor
*/
public function bind($topic, $processorName, callable $processor)
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Tests/Client/MessageProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,4 @@ public function jsonSerialize()
{
return ['foo' => 'fooVal'];
}
};
}
6 changes: 4 additions & 2 deletions pkg/enqueue/Tests/Consumption/QueueConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,9 @@ public function testShouldCallEachQueueOneByOne()
}

/**
* @param null|mixed $message
*
* @return \PHPUnit_Framework_MockObject_MockObject|Consumer
* @param null|mixed $message
*/
protected function createMessageConsumerStub($message = null)
{
Expand All @@ -971,8 +972,9 @@ protected function createMessageConsumerStub($message = null)
}

/**
* @param null|mixed $messageConsumer
*
* @return \PHPUnit_Framework_MockObject_MockObject|PsrContext
* @param null|mixed $messageConsumer
*/
protected function createPsrContextStub($messageConsumer = null)
{
Expand Down
3 changes: 2 additions & 1 deletion pkg/enqueue/Tests/Symfony/Client/Meta/QueuesCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ protected function executeCommand(Command $command, array $arguments = [])
}

/**
* @param mixed $destinations
*
* @return \PHPUnit_Framework_MockObject_MockObject|QueueMetaRegistry
* @param mixed $destinations
*/
protected function createQueueMetaRegistryStub($destinations = [])
{
Expand Down
1 change: 1 addition & 0 deletions pkg/enqueue/Tests/Util/JSONTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function nonStringDataProvider()

/**
* @dataProvider nonStringDataProvider
*
* @param mixed $value
*/
public function testShouldThrowExceptionIfInputIsNotString($value)
Expand Down
1 change: 1 addition & 0 deletions pkg/enqueue/Tests/Util/VarExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public function testCouldBeConstructedWithValueAsArgument()

/**
* @dataProvider provideValues
*
* @param mixed $value
* @param mixed $expected
*/
Expand Down
2 changes: 2 additions & 0 deletions pkg/job-queue/Tests/CalculateRootJobStatusServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function stopStatusProvider()

/**
* @dataProvider stopStatusProvider
*
* @param mixed $status
*/
public function testShouldDoNothingIfRootJobHasStopState($status)
Expand Down Expand Up @@ -73,6 +74,7 @@ public function testShouldCalculateRootJobStatus()

/**
* @dataProvider stopStatusProvider
*
* @param mixed $stopStatus
*/
public function testShouldCalculateRootJobStatusAndSetStoppedAtTimeIfGotStopStatus($stopStatus)
Expand Down
2 changes: 1 addition & 1 deletion pkg/stomp/StompConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(array $config)
public function createContext()
{
if ($this->config['lazy']) {
return new StompContext(function() {
return new StompContext(function () {
return $this->establishConnection();
});
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/stomp/Tests/StompConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ public function testShouldCreateLazyContext()
$this->assertInstanceOf(StompContext::class, $context);

$this->assertAttributeEquals(null, 'stomp', $context);
$this->assertTrue(is_callable($this->readAttribute($context, 'stompFactory')));
$this->assertInternalType('callable', $this->readAttribute($context, 'stompFactory'));
}
}
2 changes: 1 addition & 1 deletion pkg/stomp/Tests/StompContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testCouldBeCreatedWithRequiredArguments()

public function testCouldBeConstructedWithExtChannelCallbackFactoryAsFirstArgument()
{
new StompContext(function() {
new StompContext(function () {
return $this->createStompClientMock();
});
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/stomp/Tests/StompHeadersEncoderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function propertyValuesDataProvider()

/**
* @dataProvider headerValuesDataProvider
*
* @param mixed $originalValue
* @param mixed $encodedValue
*/
Expand All @@ -42,6 +43,7 @@ public function testShouldEncodeHeaders($originalValue, $encodedValue)

/**
* @dataProvider propertyValuesDataProvider
*
* @param mixed $originalValue
* @param mixed $encodedValue
*/
Expand All @@ -52,6 +54,7 @@ public function testShouldEncodeProperties($originalValue, $encodedValue)

/**
* @dataProvider headerValuesDataProvider
*
* @param mixed $originalValue
* @param mixed $encodedValue
*/
Expand All @@ -62,6 +65,7 @@ public function testShouldDecodeHeaders($originalValue, $encodedValue)

/**
* @dataProvider propertyValuesDataProvider
*
* @param mixed $originalValue
* @param mixed $encodedValue
*/
Expand Down