From 1f7687da6a02c7695bfd6bad12eb80de52aca162 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sun, 15 Mar 2026 15:44:26 +0100 Subject: [PATCH] cleanup CS --- .gitignore | 2 +- composer.json | 4 ++-- phpcs.xml | 12 ++++++++++++ rector.php | 1 + src/Job/SendMailJob.php | 1 - 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 phpcs.xml diff --git a/.gitignore b/.gitignore index 8c998b3..1df2e86 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ /tags /composer.lock /phpunit.xml -/phpcs.xml /tools /vendor *.mo @@ -16,6 +15,7 @@ error.log /tests/test_app/config/TestsQueue/schema-dump-test.lock /tests/test_app/Plugin/TestBlog/config/Queue/* .phpunit.cache +.phpcs.cache # IDE and editor specific files # ################################# diff --git a/composer.json b/composer.json index 5a5934f..a59d9b1 100644 --- a/composer.json +++ b/composer.json @@ -60,8 +60,8 @@ "@cs-check", "@test" ], - "cs-check": "phpcs --colors -p src/ tests/", - "cs-fix": "phpcbf --colors -p src/ tests/", + "cs-check": "phpcs", + "cs-fix": "phpcbf", "stan": "@phpstan", "phpstan": "tools/phpstan analyse", "stan-baseline": "tools/phpstan --generate-baseline", diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..007dfc4 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,12 @@ + + + src/ + tests/ + + + + + + + tests/comparisons/* + diff --git a/rector.php b/rector.php index 330dc43..0f74ba1 100644 --- a/rector.php +++ b/rector.php @@ -25,6 +25,7 @@ DocblockReturnArrayFromDirectArrayInstanceRector::class => [ __DIR__ . '/src/Mailer/Transport/QueueTransport.php', ], + 'tests/TestCase/Queue/ProcessorTest.php', ]) ->withParallel() ->withPreparedSets( diff --git a/src/Job/SendMailJob.php b/src/Job/SendMailJob.php index efb7ea7..5e76926 100644 --- a/src/Job/SendMailJob.php +++ b/src/Job/SendMailJob.php @@ -38,7 +38,6 @@ public function execute(Message $message): ?string try { $transportClassName = $message->getArgument('transport'); $config = $message->getArgument('config', []); - /** @var \Cake\Mailer\AbstractTransport $transport */ $transport = $this->getTransport($transportClassName, $config); $emailMessage = new MailerMessage();