From df15cc6db263db66624954bca7744d653ad9982d Mon Sep 17 00:00:00 2001
From: Holger Veltrup <92872893+sitepark-veltrup@users.noreply.github.com>
Date: Tue, 2 Jul 2024 11:39:48 +0200
Subject: [PATCH] feat: switch to php-cs-fixer (#16)
---
.phive/phars.xml | 1 +
.php-cs-fixer.dist.php | 12 ++
composer.json | 8 +-
composer.lock | 144 +++++++++---------
phpcs.xml.dist | 25 ---
src/AtooloDeploymentBundle.php | 4 +-
src/Console/Command/DeployCommand.php | 6 +-
src/Controller/DeployController.php | 5 +-
src/Service/Deployer.php | 7 +-
src/Service/StopWorkerOnRedeployListener.php | 10 +-
.../StopWorkerOnRedeployListenerTest.php | 10 +-
11 files changed, 108 insertions(+), 124 deletions(-)
create mode 100644 .php-cs-fixer.dist.php
delete mode 100644 phpcs.xml.dist
diff --git a/.phive/phars.xml b/.phive/phars.xml
index 8bad0db..7a060a0 100644
--- a/.phive/phars.xml
+++ b/.phive/phars.xml
@@ -4,4 +4,5 @@
+
diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php
new file mode 100644
index 0000000..29895a6
--- /dev/null
+++ b/.php-cs-fixer.dist.php
@@ -0,0 +1,12 @@
+in(__DIR__ . '/src')
+ ->in(__DIR__ . '/test');
+
+return (new \PhpCsFixer\Config())
+ ->setCacheFile('var/cache/php-cs-fixer')
+ ->setFinder($finder)
+ ->setRules(['@PER-CS' => true]);
diff --git a/composer.json b/composer.json
index 2d1b9cf..7e96c11 100644
--- a/composer.json
+++ b/composer.json
@@ -64,15 +64,15 @@
}
},
"scripts": {
- "post-install-cmd": "phive --no-progress install --force-accept-unsigned --trust-gpg-keys C00543248C87FB13,4AA394086372C20A,CF1A108D0E7AE720,51C67305FFC2E5C0",
+ "post-install-cmd": "phive --no-progress install --force-accept-unsigned --trust-gpg-keys C00543248C87FB13,4AA394086372C20A,CF1A108D0E7AE720,51C67305FFC2E5C0,E82B2FB314E9906E",
"analyse": [
"@analyse:phplint",
"@analyse:phpstan",
- "@analyse:phpcs",
+ "@analyse:phpcsfixer",
"@analyse:compatibilitycheck"
],
"analyse:compatibilitycheck": "./vendor/bin/phpcs --standard=./phpcs.compatibilitycheck.xml",
- "analyse:phpcs": "./vendor/bin/phpcs",
+ "analyse:phpcsfixer": "./tools/php-cs-fixer check --diff --show-progress=dots",
"analyse:phplint": "./tools/phplint",
"analyse:phpstan": "./tools/phpstan analyse",
"cs-fix": [
@@ -80,10 +80,8 @@
],
"cs-fix:phpcbf": "./vendor/bin/phpcbf",
"report": [
- "@report:phpcs",
"@report:phpstan"
],
- "report:phpcs": "./vendor/bin/phpcs || exit 0",
"report:phpstan": "./tools/phpstan analyse --no-progress --no-ansi --no-interaction --error-format=checkstyle > ./var/log/phpstan-report.xml || exit 0",
"test": [
"@test:phpunit"
diff --git a/composer.lock b/composer.lock
index c8f2815..52ad8b1 100644
--- a/composer.lock
+++ b/composer.lock
@@ -258,16 +258,16 @@
},
{
"name": "symfony/cache",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
- "reference": "760294dc7158372699dccd077965c16c328f8719"
+ "reference": "e933e1d947ffb88efcdd34a2bd51561cab7deaae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/cache/zipball/760294dc7158372699dccd077965c16c328f8719",
- "reference": "760294dc7158372699dccd077965c16c328f8719",
+ "url": "https://api.github.com/repos/symfony/cache/zipball/e933e1d947ffb88efcdd34a2bd51561cab7deaae",
+ "reference": "e933e1d947ffb88efcdd34a2bd51561cab7deaae",
"shasum": ""
},
"require": {
@@ -335,7 +335,7 @@
"psr6"
],
"support": {
- "source": "https://github.com/symfony/cache/tree/v7.1.1"
+ "source": "https://github.com/symfony/cache/tree/v7.1.2"
},
"funding": [
{
@@ -351,7 +351,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-11T13:32:38+00:00"
},
{
"name": "symfony/cache-contracts",
@@ -580,16 +580,16 @@
},
{
"name": "symfony/dependency-injection",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "77c636dfd86c0b60c5d184b2fd2ddf8dd11c309c"
+ "reference": "6e108cded928bdafaf1da3fabe30dd5af20e36b9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/77c636dfd86c0b60c5d184b2fd2ddf8dd11c309c",
- "reference": "77c636dfd86c0b60c5d184b2fd2ddf8dd11c309c",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6e108cded928bdafaf1da3fabe30dd5af20e36b9",
+ "reference": "6e108cded928bdafaf1da3fabe30dd5af20e36b9",
"shasum": ""
},
"require": {
@@ -640,7 +640,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/dependency-injection/tree/v7.1.1"
+ "source": "https://github.com/symfony/dependency-injection/tree/v7.1.2"
},
"funding": [
{
@@ -656,7 +656,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-28T10:03:55+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -727,16 +727,16 @@
},
{
"name": "symfony/error-handler",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
- "reference": "e9b8bbce0b4f322939332ab7b6b81d8c11da27dd"
+ "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/error-handler/zipball/e9b8bbce0b4f322939332ab7b6b81d8c11da27dd",
- "reference": "e9b8bbce0b4f322939332ab7b6b81d8c11da27dd",
+ "url": "https://api.github.com/repos/symfony/error-handler/zipball/2412d3dddb5c9ea51a39cfbff1c565fc9844ca32",
+ "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32",
"shasum": ""
},
"require": {
@@ -782,7 +782,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/error-handler/tree/v7.1.1"
+ "source": "https://github.com/symfony/error-handler/tree/v7.1.2"
},
"funding": [
{
@@ -798,7 +798,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-25T19:55:06+00:00"
},
{
"name": "symfony/event-dispatcher",
@@ -958,16 +958,16 @@
},
{
"name": "symfony/filesystem",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "802e87002f919296c9f606457d9fa327a0b3d6b2"
+ "reference": "92a91985250c251de9b947a14bb2c9390b1a562c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/802e87002f919296c9f606457d9fa327a0b3d6b2",
- "reference": "802e87002f919296c9f606457d9fa327a0b3d6b2",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/92a91985250c251de9b947a14bb2c9390b1a562c",
+ "reference": "92a91985250c251de9b947a14bb2c9390b1a562c",
"shasum": ""
},
"require": {
@@ -1004,7 +1004,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v7.1.1"
+ "source": "https://github.com/symfony/filesystem/tree/v7.1.2"
},
"funding": [
{
@@ -1020,7 +1020,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-28T10:03:55+00:00"
},
{
"name": "symfony/finder",
@@ -1088,16 +1088,16 @@
},
{
"name": "symfony/framework-bundle",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/framework-bundle.git",
- "reference": "79a20497022b8853416e20c836ee150b754c332a"
+ "reference": "54a84f49658e2e87167396b2259a55e55e11f4a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/79a20497022b8853416e20c836ee150b754c332a",
- "reference": "79a20497022b8853416e20c836ee150b754c332a",
+ "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/54a84f49658e2e87167396b2259a55e55e11f4a2",
+ "reference": "54a84f49658e2e87167396b2259a55e55e11f4a2",
"shasum": ""
},
"require": {
@@ -1215,7 +1215,7 @@
"description": "Provides a tight integration between Symfony components and the Symfony full-stack framework",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/framework-bundle/tree/v7.1.1"
+ "source": "https://github.com/symfony/framework-bundle/tree/v7.1.2"
},
"funding": [
{
@@ -1231,7 +1231,7 @@
"type": "tidelift"
}
],
- "time": "2024-06-04T06:40:14+00:00"
+ "time": "2024-06-28T08:00:31+00:00"
},
{
"name": "symfony/http-foundation",
@@ -1312,16 +1312,16 @@
},
{
"name": "symfony/http-kernel",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "fa8d1c75b5f33b1302afccf81811f93976c6e26f"
+ "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fa8d1c75b5f33b1302afccf81811f93976c6e26f",
- "reference": "fa8d1c75b5f33b1302afccf81811f93976c6e26f",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6",
+ "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6",
"shasum": ""
},
"require": {
@@ -1406,7 +1406,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-kernel/tree/v7.1.1"
+ "source": "https://github.com/symfony/http-kernel/tree/v7.1.2"
},
"funding": [
{
@@ -1422,20 +1422,20 @@
"type": "tidelift"
}
],
- "time": "2024-06-04T06:52:15+00:00"
+ "time": "2024-06-28T13:13:31+00:00"
},
{
"name": "symfony/messenger",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/messenger.git",
- "reference": "70df0484323979f555df70bbb14d85c75f186010"
+ "reference": "8cafca5f0fade46acf4a6b32b2d5e495f798a56b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/messenger/zipball/70df0484323979f555df70bbb14d85c75f186010",
- "reference": "70df0484323979f555df70bbb14d85c75f186010",
+ "url": "https://api.github.com/repos/symfony/messenger/zipball/8cafca5f0fade46acf4a6b32b2d5e495f798a56b",
+ "reference": "8cafca5f0fade46acf4a6b32b2d5e495f798a56b",
"shasum": ""
},
"require": {
@@ -1492,7 +1492,7 @@
"description": "Helps applications send and receive messages to/from other applications or via message queues",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/messenger/tree/v7.1.1"
+ "source": "https://github.com/symfony/messenger/tree/v7.1.2"
},
"funding": [
{
@@ -1508,7 +1508,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-28T08:00:31+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -1911,16 +1911,16 @@
},
{
"name": "symfony/var-dumper",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "deb2c2b506ff6fdbb340e00b34e9901e1605f293"
+ "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/deb2c2b506ff6fdbb340e00b34e9901e1605f293",
- "reference": "deb2c2b506ff6fdbb340e00b34e9901e1605f293",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5857c57c6b4b86524c08cf4f4bc95327270a816d",
+ "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d",
"shasum": ""
},
"require": {
@@ -1974,7 +1974,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v7.1.1"
+ "source": "https://github.com/symfony/var-dumper/tree/v7.1.2"
},
"funding": [
{
@@ -1990,20 +1990,20 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-28T08:00:31+00:00"
},
{
"name": "symfony/var-exporter",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
- "reference": "db82c2b73b88734557cfc30e3270d83fa651b712"
+ "reference": "b80a669a2264609f07f1667f891dbfca25eba44c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/db82c2b73b88734557cfc30e3270d83fa651b712",
- "reference": "db82c2b73b88734557cfc30e3270d83fa651b712",
+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b80a669a2264609f07f1667f891dbfca25eba44c",
+ "reference": "b80a669a2264609f07f1667f891dbfca25eba44c",
"shasum": ""
},
"require": {
@@ -2050,7 +2050,7 @@
"serialize"
],
"support": {
- "source": "https://github.com/symfony/var-exporter/tree/v7.1.1"
+ "source": "https://github.com/symfony/var-exporter/tree/v7.1.2"
},
"funding": [
{
@@ -2066,7 +2066,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-28T08:00:31+00:00"
},
{
"name": "symfony/yaml",
@@ -3262,16 +3262,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "10.1.14",
+ "version": "10.1.15",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b"
+ "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b",
- "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae",
+ "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae",
"shasum": ""
},
"require": {
@@ -3328,7 +3328,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.15"
},
"funding": [
{
@@ -3336,7 +3336,7 @@
"type": "github"
}
],
- "time": "2024-03-12T15:33:41+00:00"
+ "time": "2024-06-29T08:25:15+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -5614,16 +5614,16 @@
},
{
"name": "symfony/console",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "9b008f2d7b21c74ef4d0c3de6077a642bc55ece3"
+ "reference": "0aa29ca177f432ab68533432db0de059f39c92ae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/9b008f2d7b21c74ef4d0c3de6077a642bc55ece3",
- "reference": "9b008f2d7b21c74ef4d0c3de6077a642bc55ece3",
+ "url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae",
+ "reference": "0aa29ca177f432ab68533432db0de059f39c92ae",
"shasum": ""
},
"require": {
@@ -5687,7 +5687,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v7.1.1"
+ "source": "https://github.com/symfony/console/tree/v7.1.2"
},
"funding": [
{
@@ -5703,7 +5703,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-31T14:57:53+00:00"
+ "time": "2024-06-28T10:03:55+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
@@ -5927,16 +5927,16 @@
},
{
"name": "symfony/string",
- "version": "v7.1.1",
+ "version": "v7.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "60bc311c74e0af215101235aa6f471bcbc032df2"
+ "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/60bc311c74e0af215101235aa6f471bcbc032df2",
- "reference": "60bc311c74e0af215101235aa6f471bcbc032df2",
+ "url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8",
+ "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8",
"shasum": ""
},
"require": {
@@ -5994,7 +5994,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v7.1.1"
+ "source": "https://github.com/symfony/string/tree/v7.1.2"
},
"funding": [
{
@@ -6010,7 +6010,7 @@
"type": "tidelift"
}
],
- "time": "2024-06-04T06:40:14+00:00"
+ "time": "2024-06-28T09:27:18+00:00"
},
{
"name": "thecodingmachine/safe",
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
deleted file mode 100644
index 1ae9151..0000000
--- a/phpcs.xml.dist
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- src/
- test/
-
-
-
-
-
-
-
-
-
-
diff --git a/src/AtooloDeploymentBundle.php b/src/AtooloDeploymentBundle.php
index c5ae842..8704c0c 100644
--- a/src/AtooloDeploymentBundle.php
+++ b/src/AtooloDeploymentBundle.php
@@ -29,8 +29,8 @@ public function build(ContainerBuilder $container): void
new LoaderResolver(
[
new YamlFileLoader($container, new FileLocator($configDir)),
- ]
- )
+ ],
+ ),
);
$loader->load('services.yaml');
diff --git a/src/Console/Command/DeployCommand.php b/src/Console/Command/DeployCommand.php
index d35820e..fec032f 100644
--- a/src/Console/Command/DeployCommand.php
+++ b/src/Console/Command/DeployCommand.php
@@ -14,19 +14,19 @@
name: 'deployment:deploy',
description: 'Executes all Deployer-Task to deploy ' .
'the application to be production ready',
- aliases: ['feds:warm-up']
+ aliases: ['feds:warm-up'],
)]
final class DeployCommand extends Command
{
public function __construct(
- private readonly Deployer $deployer
+ private readonly Deployer $deployer,
) {
parent::__construct();
}
protected function execute(
InputInterface $input,
- OutputInterface $output
+ OutputInterface $output,
): int {
$successful = $this->deployer->execute();
return $successful ? Command::SUCCESS : Command::FAILURE;
diff --git a/src/Controller/DeployController.php b/src/Controller/DeployController.php
index 410633c..1986cf6 100644
--- a/src/Controller/DeployController.php
+++ b/src/Controller/DeployController.php
@@ -16,9 +16,8 @@ final class DeployController extends AbstractController
/**
*/
public function __construct(
- private readonly Deployer $deployer
- ) {
- }
+ private readonly Deployer $deployer,
+ ) {}
#[Route('/api/admin/deploy', name: 'atoolo_deployment_deploy')]
public function deploy(Request $request): Response
diff --git a/src/Service/Deployer.php b/src/Service/Deployer.php
index d85c1a6..d565b60 100644
--- a/src/Service/Deployer.php
+++ b/src/Service/Deployer.php
@@ -13,9 +13,8 @@ class Deployer
*/
public function __construct(
private readonly iterable $deploymentTasks,
- private readonly LoggerInterface $logger
- ) {
- }
+ private readonly LoggerInterface $logger,
+ ) {}
public function execute(): bool
{
@@ -29,7 +28,7 @@ public function execute(): bool
$this->logger->warning(
'An exception occurred during deployment task: ' .
$throwable->getMessage(),
- ['exception' => $throwable, 'task' => get_class($task)]
+ ['exception' => $throwable, 'task' => get_class($task)],
);
}
}
diff --git a/src/Service/StopWorkerOnRedeployListener.php b/src/Service/StopWorkerOnRedeployListener.php
index 70bd4f2..1e1a9f8 100644
--- a/src/Service/StopWorkerOnRedeployListener.php
+++ b/src/Service/StopWorkerOnRedeployListener.php
@@ -37,14 +37,14 @@ public function __construct(
) {
if (!isset($_SERVER['SCRIPT_FILENAME'])) {
throw new RuntimeException(
- '$_SERVER[\'SCRIPT_FILENAME\'] is not set'
+ '$_SERVER[\'SCRIPT_FILENAME\'] is not set',
);
}
$this->scriptFilename = $_SERVER['SCRIPT_FILENAME'];
$scriptFilenameRealPath = realpath($this->scriptFilename);
if ($scriptFilenameRealPath === false) {
throw new RuntimeException(
- 'unable to determine realpath of ' . $this->scriptFilename
+ 'unable to determine realpath of ' . $this->scriptFilename,
);
}
$this->scriptFilenameRealPath = $scriptFilenameRealPath;
@@ -56,7 +56,7 @@ public function onWorkerStarted(): void
'start redeploy listener with '
. $this->scriptFilename
. ' -> '
- . $this->scriptFilenameRealPath
+ . $this->scriptFilenameRealPath,
);
}
@@ -70,10 +70,10 @@ public function onWorkerRunning(WorkerRunningEvent $event): void
}
$this->workerLogger->info(
- 'The project directory has changed. This project was undeployed.'
+ 'The project directory has changed. This project was undeployed.',
);
$this->workerLogger->info(
- 'The worker is stopped.'
+ 'The worker is stopped.',
);
$event->getWorker()->stop();
}
diff --git a/test/Service/StopWorkerOnRedeployListenerTest.php b/test/Service/StopWorkerOnRedeployListenerTest.php
index 73fa095..fca8a0c 100644
--- a/test/Service/StopWorkerOnRedeployListenerTest.php
+++ b/test/Service/StopWorkerOnRedeployListenerTest.php
@@ -41,7 +41,7 @@ public function setUp(): void
&& mkdir($this->workDir, 0777, true) === false
) {
throw new RuntimeException(
- 'unable to create work directory ' . $this->workDir
+ 'unable to create work directory ' . $this->workDir,
);
}
@@ -58,7 +58,7 @@ public function setUp(): void
$this->logger = $this->createStub(LoggerInterface::class);
$this->listener = new StopWorkerOnRedeployListener(
- $this->logger
+ $this->logger,
);
}
@@ -98,7 +98,7 @@ public function testGetSubscribedEvents(): void
WorkerRunningEvent::class => 'onWorkerRunning',
],
StopWorkerOnRedeployListener::getSubscribedEvents(),
- 'should return the correct events'
+ 'should return the correct events',
);
}
@@ -120,7 +120,7 @@ public function testMissingScriptFilenameServerVar(): void
unset($_SERVER['SCRIPT_FILENAME']);
$this->expectException(RuntimeException::class);
new StopWorkerOnRedeployListener(
- $this->createStub(LoggerInterface::class)
+ $this->createStub(LoggerInterface::class),
);
}
@@ -129,7 +129,7 @@ public function testMissingInvalidScriptFilenameServerVar(): void
$_SERVER['SCRIPT_FILENAME'] = 'invalid';
$this->expectException(RuntimeException::class);
new StopWorkerOnRedeployListener(
- $this->createStub(LoggerInterface::class)
+ $this->createStub(LoggerInterface::class),
);
}