@@ -414,10 +414,11 @@ function env(string $key, $default = null)
414414 * If $data is an array, then it loops over it, escaping each
415415 * 'value' of the key/value pairs.
416416 *
417- * Valid context values: html, js, css, url, attr, raw
418- *
419417 * @param array|string $data
420- * @param string $encoding
418+ * @phpstan-param 'html'|'js'|'css'|'url'|'attr'|'raw' $context
419+ * @param string|null $encoding Current encoding for escaping.
420+ * If not UTF-8, we convert strings from this encoding
421+ * pre-escaping and back to this encoding post-escaping.
421422 *
422423 * @return array|string
423424 *
@@ -823,10 +824,11 @@ function model(string $name, bool $getShared = true, ?ConnectionInterface &$conn
823824 * Provides access to "old input" that was set in the session
824825 * during a redirect()->withInput().
825826 *
826- * @param null $default
827- * @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
828830 *
829- * @return mixed |null
831+ * @return array|string |null
830832 */
831833 function old (string $ key , $ default = null , $ escape = 'html ' )
832834 {
@@ -932,7 +934,8 @@ function route_to(string $method, ...$params)
932934 *
933935 * @param string $val
934936 *
935- * @return mixed|Session|null
937+ * @return array|bool|float|int|object|Session|string|null
938+ * @phpstan-return ($val is null ? Session : array|bool|float|int|object|string|null)
936939 */
937940 function session (?string $ val = null )
938941 {
0 commit comments