Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
4 changes: 3 additions & 1 deletion src/Platform/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down