From 0a18f34fcf0688d6568b798c70ee64b43c7aec3f Mon Sep 17 00:00:00 2001 From: Okan Date: Thu, 4 Jul 2024 10:57:46 +0300 Subject: [PATCH] Made mock handler nullable for disabling fake transmission. --- src/Http/MyDataRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/MyDataRequest.php b/src/Http/MyDataRequest.php index 48fec45..7b346d3 100644 --- a/src/Http/MyDataRequest.php +++ b/src/Http/MyDataRequest.php @@ -28,9 +28,9 @@ abstract class MyDataRequest private static ?bool $is_provider = false; private static array $request_options; - private static HandlerStack $handler; + private static ?HandlerStack $handler; - public static function setHandler(MockHandler $handler): void + public static function setHandler(?MockHandler $handler): void { self::$handler = HandlerStack::create($handler); }