PHP-CS-Fixer fixes
Some checks failed
lint / lint (push) Failing after 15s

This commit is contained in:
n 2024-09-14 15:48:36 +02:00
parent 9e67ed202b
commit 13235cc0fb
Signed by: n
GPG key ID: 510227DD6C502CE3
2 changed files with 5 additions and 5 deletions

View file

@ -1,3 +1,4 @@
---
name: lint
run-name: lint is launched by ${{ github.actor }}
on: [push]
@ -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 }}."

View file

@ -16,7 +16,7 @@ function hook_clickat_render_linklist($data)
'/([^\S]+)@([\w]+)@([\w_\-\.]+)/' => '\1<a href="https://\3/@\2">&commat;\2</a>',
'/([^\S]+)@([\w]+)/' => '\1<a href="https://x.com/\2">&commat;\2</a>'
);
foreach ($data['links'] as &$value) {
foreach ($data['links'] as $value) {
if (strpos($value['description'], '@') !== false) {
foreach ($patterns as $nic => $link) {
$value['description'] = preg_replace($nic, $link, $value['description']);