From 13235cc0fbcdc2e18f28839bdc544fb27cf9d388 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 | 6 +++--- clickat.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/lint.yml b/.forgejo/workflows/lint.yml index 3f6dd80..dffc276 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 @@ -22,6 +23,5 @@ jobs: - name: Lint run: vendor/bin/phplint --no-cache --no-progress --exclude=vendor --verbose - name: PHP CS Fixer - run: vendor/bin/php-cs-fixer fix --dry-run --verbose --diff . + run: vendor/bin/php-cs-fixer check --using-cache=no --diff --verbose . - run: echo "🍏 This job's status is ${{ job.status }}." - diff --git a/clickat.php b/clickat.php index b5516ba..6124617 100644 --- a/clickat.php +++ b/clickat.php @@ -16,9 +16,9 @@ function hook_clickat_render_linklist($data) '/([^\S]+)@([\w]+)@([\w_\-\.]+)/' => '\1@\2', '/([^\S]+)@([\w]+)/' => '\1@\2' ); - foreach ($data['links'] as &$value) { + 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']); } }