From 956b3ff4ebca6f1cc816a22f2d46e4eb4855df3d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 3 Sep 2025 22:12:17 +0530 Subject: [PATCH 1/2] chore: update action param to have example field --- src/Platform/Action.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Platform/Action.php b/src/Platform/Action.php index eb40083..aeac0b7 100644 --- a/src/Platform/Action.php +++ b/src/Platform/Action.php @@ -168,9 +168,10 @@ public function getParams(): array * @param array $injections * @param bool $skipValidation * @param bool $deprecated + * @param string $example * @return self */ - public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false, bool $deprecated = false): self + public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false, bool $deprecated = false, string $example = ''): self { $param = [ 'default' => $default, @@ -180,6 +181,7 @@ public function param(string $key, mixed $default, Validator|callable $validator 'injections' => $injections, 'skipValidation' => $skipValidation, 'deprecated' => $deprecated, // TODO: @Meldiron implement tests + 'example' => $example, ]; $this->options['param:'.$key] = array_merge($param, ['type' => 'param']); $this->params[$key] = $param; From d8aa999e087b9ecfd250923bb69336c153c3b502 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 3 Sep 2025 22:15:54 +0530 Subject: [PATCH 2/2] chore: add pint.json so format works --- pint.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pint.json diff --git a/pint.json b/pint.json new file mode 100644 index 0000000..288cbb8 --- /dev/null +++ b/pint.json @@ -0,0 +1,17 @@ +{ + "preset": "psr12", + "exclude": [], + "rules": { + "array_indentation": true, + "single_import_per_statement": true, + "simplified_null_return": true, + "ordered_imports": { + "sort_algorithm": "alpha", + "imports_order": [ + "const", + "class", + "function" + ] + } + } +}