mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 23:31:21 +02:00
justfile: standardise test recipes to lint-php/lint-css/lint-js/test + add fix recipe
- Removed ambiguous aliases: phpstan, cs-check (both pointed to lint-php which also ran php-cs-fixer, making the names misleading) - Removed syntax (php -l) — redundant, phpstan already catches parse errors - Split lint-biome into lint-css and lint-js with correct paths - Added lint meta-recipe that runs all three linters - Added fix recipe: biome check --write (CSS/JS format+lint) + php-cs-fixer fix (PHP) - Updated build-lint to delegate to lint-css + lint-js
This commit is contained in:
@@ -41,9 +41,15 @@ class FormBootstrap
|
||||
public static function adminOld(array &$formData): callable
|
||||
{
|
||||
return function (string $key, string $default = '') use (&$formData): string|array {
|
||||
if (!isset($formData[$key])) return $default;
|
||||
if (is_array($formData[$key])) return $formData[$key];
|
||||
if ($formData[$key] === null) return $default;
|
||||
if (!isset($formData[$key])) {
|
||||
return $default;
|
||||
}
|
||||
if (is_array($formData[$key])) {
|
||||
return $formData[$key];
|
||||
}
|
||||
if ($formData[$key] === null) {
|
||||
return $default;
|
||||
}
|
||||
return htmlspecialchars((string)$formData[$key]);
|
||||
};
|
||||
}
|
||||
@@ -159,7 +165,9 @@ class FormBootstrap
|
||||
'helpBlocks' => $helpBlocks,
|
||||
'oldFn' => self::adminOld($formData),
|
||||
'withAutofocusFn' => function (string $field, array $attrs = []) use ($autofocusField): array {
|
||||
if ($autofocusField === $field) $attrs['autofocus'] = true;
|
||||
if ($autofocusField === $field) {
|
||||
$attrs['autofocus'] = true;
|
||||
}
|
||||
return $attrs;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user