Skip to content

Commit

Permalink
Running php-cs-fixer
Browse files Browse the repository at this point in the history
Running php-cs-fixer to fix CS drift
  • Loading branch information
JimTools committed Jan 17, 2025
1 parent 0f35503 commit 29af748
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 13 deletions.
6 changes: 2 additions & 4 deletions Consumption/Extension/DoctrinePingConnectionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
use Doctrine\Persistence\ManagerRegistry;
use Enqueue\Consumption\Context\MessageReceived;
use Enqueue\Consumption\MessageReceivedExtensionInterface;
use ErrorException;
use Throwable;

class DoctrinePingConnectionExtension implements MessageReceivedExtensionInterface
{
Expand Down Expand Up @@ -49,7 +47,7 @@ public function onMessageReceived(MessageReceived $context): void
private function ping(Connection $connection): bool
{
set_error_handler(static function (int $severity, string $message, string $file, int $line): bool {
throw new ErrorException($message, $severity, $severity, $file, $line);
throw new \ErrorException($message, $severity, $severity, $file, $line);
});

try {
Expand All @@ -58,7 +56,7 @@ private function ping(Connection $connection): bool
$connection->executeQuery($dummySelectSQL);

return true;
} catch (Throwable $exception) {
} catch (\Throwable $exception) {
return false;
} finally {
restore_error_handler();
Expand Down
4 changes: 2 additions & 2 deletions EnqueueBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class EnqueueBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
//transport passes
// transport passes
$container->addCompilerPass(new BuildConsumptionExtensionsPass());
$container->addCompilerPass(new BuildProcessorRegistryPass());

//client passes
// client passes
$container->addCompilerPass(new BuildClientConsumptionExtensionsPass());
$container->addCompilerPass(new BuildClientExtensionsPass());
$container->addCompilerPass(new BuildClientTopicSubscriberRoutesPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 100);
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/App/TestAsyncEventTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public function __construct(Context $context)
$this->context = $context;
}

public function toMessage($eventName, Event $event = null)
public function toMessage($eventName, ?Event $event = null)
{
if (Event::class === get_class($event)) {
if (Event::class === $event::class) {
return $this->context->createMessage(json_encode(''));
}

Expand Down
1 change: 0 additions & 1 deletion Tests/Functional/Client/ProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Enqueue\Bundle\Tests\Functional\WebTestCase;
use Enqueue\Client\Message;
use Enqueue\Client\Producer;
use Enqueue\Client\ProducerInterface;
use Enqueue\Client\TraceableProducer;
use Enqueue\Rpc\Promise;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/TestCommandProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class TestCommandProcessor implements Processor, CommandSubscriberInterface
{
const COMMAND = 'test-command';
public const COMMAND = 'test-command';

/**
* @var Message
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/TestProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class TestProcessor implements Processor, TopicSubscriberInterface
{
const TOPIC = 'test-topic';
public const TOPIC = 'test-topic';

/**
* @var Message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

class ResetServicesExtensionTest extends TestCase
{

public function testItShouldResetServices()
{
$resetter = $this->createResetterMock();
Expand Down
2 changes: 1 addition & 1 deletion Tests/fix_composer_json.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
$composerJson['config']['platform']['ext-amqp'] = '1.9.3';
$composerJson['config']['platform']['ext-mongo'] = '1.6.14';

file_put_contents(__DIR__.'/../composer.json', json_encode($composerJson, JSON_PRETTY_PRINT));
file_put_contents(__DIR__.'/../composer.json', json_encode($composerJson, \JSON_PRETTY_PRINT));

0 comments on commit 29af748

Please # to comment.