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" + ] + } + } +} 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;