Skip to content

Commit e111502

Browse files
committed
docs: update @param
1 parent d21c65d commit e111502

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

system/Common.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,9 @@ function model(string $name, bool $getShared = true, ?ConnectionInterface &$conn
824824
* Provides access to "old input" that was set in the session
825825
* during a redirect()->withInput().
826826
*
827-
* @param string|null $default
828-
* @param bool|string $escape
827+
* @param string|null $default
828+
* @param false|string $escape
829+
* @phpstan-param false|'attr'|'css'|'html'|'js'|'raw'|'url' $escape
829830
*
830831
* @return array|string|null
831832
*/

system/View/Filters.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public static function default($value, string $default): string
7575
* Escapes the given value with our `esc()` helper function.
7676
*
7777
* @param string $value
78+
* @phpstan-param 'html'|'js'|'css'|'url'|'attr'|'raw' $context
7879
*/
7980
public static function esc($value, string $context = 'html'): string
8081
{

system/View/View.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,9 @@ public function excerpt(string $string, int $length = 20): string
305305
/**
306306
* Sets several pieces of view data at once.
307307
*
308-
* @param string $context The context to escape it for: html, css, js, url
309-
* If null, no escaping will happen
308+
* @param string|null $context The context to escape it for: html, css, js, url
309+
* If null, no escaping will happen
310+
* @phpstan-param null|'html'|'js'|'css'|'url'|'attr'|'raw' $context
310311
*/
311312
public function setData(array $data = [], ?string $context = null): RendererInterface
312313
{
@@ -326,6 +327,7 @@ public function setData(array $data = [], ?string $context = null): RendererInte
326327
* @param mixed $value
327328
* @param string|null $context The context to escape it for: html, css, js, url
328329
* If null, no escaping will happen
330+
* @phpstan-param null|'html'|'js'|'css'|'url'|'attr'|'raw' $context
329331
*/
330332
public function setVar(string $name, $value = null, ?string $context = null): RendererInterface
331333
{

0 commit comments

Comments
 (0)