From 6d56648e1e298a7a8802988d74a862faf0a86d0b Mon Sep 17 00:00:00 2001 From: n Date: Sat, 14 Sep 2024 15:48:36 +0200 Subject: [PATCH] PHP-CS-Fixer fixes --- .forgejo/workflows/lint.yml | 4 ++-- .php-cs-fixer.php | 5 +++++ clickat.php | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .php-cs-fixer.php diff --git a/.forgejo/workflows/lint.yml b/.forgejo/workflows/lint.yml index 3f6dd80..7f90f20 100644 --- a/.forgejo/workflows/lint.yml +++ b/.forgejo/workflows/lint.yml @@ -1,3 +1,4 @@ +--- name: lint run-name: lint is launched by ${{ github.actor }} on: [push] @@ -12,7 +13,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: Install linters using Composer - run: | + run: | export COMPOSER_HOME=/tmp echo "{}" > composer.json composer config --no-interaction allow-plugins.bamarni/composer-bin-plugin true @@ -24,4 +25,3 @@ jobs: - name: PHP CS Fixer run: vendor/bin/php-cs-fixer fix --dry-run --verbose --diff . - run: echo "🍏 This job's status is ${{ job.status }}." - diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 0000000..77b7371 --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,5 @@ +setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()) +; diff --git a/clickat.php b/clickat.php index b5516ba..6ce3efe 100644 --- a/clickat.php +++ b/clickat.php @@ -18,7 +18,7 @@ function hook_clickat_render_linklist($data) ); foreach ($data['links'] as &$value) { if (strpos($value['description'], '@') !== false) { - foreach($patterns as $nic => $link) { + foreach ($patterns as $nic => $link) { $value['description'] = preg_replace($nic, $link, $value['description']); } }