This commit is contained in:
Javier Casares 2026-11-04 17:27:19 +00:00
commit 121c35737d

View file

@ -230,10 +230,12 @@ function robotstxt_docmd_get_status_badge( string $status ): string {
* Provides PHPStan level 9 compliant type-narrowing for superglobal access.
*
* @since 1.0.1
* @since 1.2.3 Parameter documented as array<mixed> — superglobals and
* get_option() returns are not guaranteed to have string keys.
*
* @param array<string, mixed> $input The superglobal array ($_POST, $_GET, etc.).
* @param string $key The key to look for.
* @param string $fallback Default value if key not found or not a string.
* @param array<mixed> $input The superglobal array ($_POST, $_GET, etc.).
* @param string $key The key to look for.
* @param string $fallback Default value if key not found or not a string.
* @return string
*/
function robotstxt_docmd_input_string( array $input, string $key, string $fallback = '' ): string {
@ -249,10 +251,12 @@ function robotstxt_docmd_input_string( array $input, string $key, string $fallba
* Provides PHPStan level 9 compliant type-narrowing for superglobal access.
*
* @since 1.0.1
* @since 1.2.3 Parameter documented as array<mixed> — superglobals and
* get_option() returns are not guaranteed to have string keys.
*
* @param array<string, mixed> $input The superglobal array ($_POST, $_GET, etc.).
* @param string $key The key to look for.
* @param int $fallback Default value if key not found or not numeric.
* @param array<mixed> $input The superglobal array ($_POST, $_GET, etc.).
* @param string $key The key to look for.
* @param int $fallback Default value if key not found or not numeric.
* @return int
*/
function robotstxt_docmd_input_int( array $input, string $key, int $fallback = 0 ): int {