diff --git a/.forgejo/workflows/lint.yml b/.forgejo/workflows/lint.yml index 3f6dd80..c605fce 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,16 +13,15 @@ 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 composer require --dev bamarni/composer-bin-plugin composer bin phplint require --dev overtrue/phplint - composer require --dev friendsofphp/php-cs-fixer + composer require --dev friendsofphp/php-cs-fixer==2.19.0 --with-all-dependencies - 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..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']); } }