diff --git a/.github/workflows/back-end.yml b/.github/workflows/back-end.yml index 64c1059..eb4e5ac 100644 --- a/.github/workflows/back-end.yml +++ b/.github/workflows/back-end.yml @@ -21,14 +21,14 @@ env: jobs: syntax_errors: name: "Syntax errors" - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" timeout-minutes: 1 steps: - name: "Set up PHP" uses: "shivammathur/setup-php@v2" with: - php-version: "7.4" + php-version: "8.1" coverage: "none" tools: "parallel-lint" - diff --git a/debug/wp-cli-run-frontend.php b/debug/wp-cli-run-frontend.php index 04ab7a7..7966852 100644 --- a/debug/wp-cli-run-frontend.php +++ b/debug/wp-cli-run-frontend.php @@ -15,13 +15,12 @@ static function () { $args = func_get_args(); $hook_name = $args[0]; $value = isset($args[1]) ? $args[1] : null; - $formatted_value = (is_string($value) || is_numeric($value)) - ? $value - : '<'.(is_object($value) - ? get_class($value) - : (is_bool($value) - ? ($value ? 'TRUE' : 'FALSE') - : gettype($value))).'>'; + $formatted_value = match (true) { + is_string($value) || is_numeric($value) => $value, + is_object($value) => '<'.get_class($value).'>', + is_bool($value) => $value ? '' : '', + default => '<'.gettype($value).'>' + }; printf("%s=%s\n", $hook_name, $formatted_value); }, PHP_INT_MAX,