Skip to content

Commit d434b8f

Browse files
committed
docs: update doc comments
1 parent 28721e7 commit d434b8f

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

system/View/Parser.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ public function renderString(string $template, ?array $options = null, ?bool $sa
185185
* so that the variable is correctly handled within the
186186
* parsing itself, and contexts (including raw) are respected.
187187
*
188-
* @param non-empty-string|null $context The context to escape it for: html, css, js, url, raw
189-
* If 'raw', no escaping will happen
188+
* @param non-empty-string|null $context The context to escape it for.
189+
* If 'raw', no escaping will happen.
190+
* @phpstan-param null|'html'|'js'|'css'|'url'|'attr'|'raw' $context
190191
*/
191192
public function setData(array $data = [], ?string $context = null): RendererInterface
192193
{

system/View/RendererInterface.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ public function renderString(string $view, ?array $options = null, bool $saveDat
4444
/**
4545
* Sets several pieces of view data at once.
4646
*
47-
* @param string|null $context The context to escape it for: html, css, js, url
48-
* If 'raw', no escaping will happen
47+
* @param non-empty-string|null $context The context to escape it for.
48+
* If 'raw', no escaping will happen.
49+
* @phpstan-param null|'html'|'js'|'css'|'url'|'attr'|'raw' $context
4950
*
5051
* @return RendererInterface
5152
*/
@@ -54,9 +55,10 @@ public function setData(array $data = [], ?string $context = null);
5455
/**
5556
* Sets a single piece of view data.
5657
*
57-
* @param mixed $value
58-
* @param string|null $context The context to escape it for: html, css, js, url
59-
* If 'raw' no escaping will happen
58+
* @param mixed $value
59+
* @param non-empty-string|null $context The context to escape it for.
60+
* If 'raw', no escaping will happen.
61+
* @phpstan-param null|'html'|'js'|'css'|'url'|'attr'|'raw' $context
6062
*
6163
* @return RendererInterface
6264
*/

system/View/View.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ public function excerpt(string $string, int $length = 20): string
330330
/**
331331
* Sets several pieces of view data at once.
332332
*
333-
* @param string|null $context The context to escape it for: html, css, js, url
334-
* If null, no escaping will happen
333+
* @param non-empty-string|null $context The context to escape it for.
334+
* If 'raw', no escaping will happen.
335335
* @phpstan-param null|'html'|'js'|'css'|'url'|'attr'|'raw' $context
336336
*/
337337
public function setData(array $data = [], ?string $context = null): RendererInterface
@@ -350,8 +350,8 @@ public function setData(array $data = [], ?string $context = null): RendererInte
350350
* Sets a single piece of view data.
351351
*
352352
* @param mixed $value
353-
* @param string|null $context The context to escape it for: html, css, js, url
354-
* If null, no escaping will happen
353+
* @param non-empty-string|null $context The context to escape it for.
354+
* If 'raw', no escaping will happen.
355355
* @phpstan-param null|'html'|'js'|'css'|'url'|'attr'|'raw' $context
356356
*/
357357
public function setVar(string $name, $value = null, ?string $context = null): RendererInterface

0 commit comments

Comments
 (0)