From 2e85cae407107b9e1468621f7a90cf80acb08935 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 6 Oct 2026 07:54:13 +0000 Subject: [PATCH] Fix PHPStan errors for optional match flags Read the optional `limit-response-size` and `link-type` flags directly so PHPStan knows they can be null. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HsH4o5pKmm1Qd5cqwAm7vB --- src/Provider_Command.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Provider_Command.php b/src/Provider_Command.php index 2a56151..5ee1770 100644 --- a/src/Provider_Command.php +++ b/src/Provider_Command.php @@ -151,8 +151,8 @@ public function match_provider( $args, $assoc_args ) { $url = $args[0]; $discover = Utils\get_flag_value( $assoc_args, 'discover', true ); - $response_size_limit = Utils\get_flag_value( $assoc_args, 'limit-response-size' ); - $link_type = Utils\get_flag_value( $assoc_args, 'link-type' ); + $response_size_limit = $assoc_args['limit-response-size'] ?? null; + $link_type = $assoc_args['link-type'] ?? null; if ( ! $discover && ( null !== $response_size_limit || null !== $link_type ) ) { if ( null !== $response_size_limit && null !== $link_type ) {