Skip to content

Commit 5112b10

Browse files
authored
Merge pull request #183 from utopia-php/feat-example-params
2 parents 88e8002 + 94af4fc commit 5112b10

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Hook.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@ public function inject(string $injection): static
198198
* @param array $injections
199199
* @param bool $skipValidation
200200
* @param bool $deprecated
201+
* @param string $example
201202
* @return static
202203
*/
203-
public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false, bool $deprecated = false): static
204+
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 = ''): static
204205
{
205206
$this->params[$key] = [
206207
'default' => $default,
@@ -210,6 +211,7 @@ public function param(string $key, mixed $default, Validator|callable $validator
210211
'injections' => $injections,
211212
'skipValidation' => $skipValidation,
212213
'deprecated' => $deprecated,
214+
'example' => $example,
213215
'value' => null,
214216
'order' => count($this->params) + count($this->injections),
215217
];

0 commit comments

Comments
 (0)