diff --git a/lib/Providers/Time/HttpTimeProvider.php b/lib/Providers/Time/HttpTimeProvider.php index 47058c5..55c20f6 100644 --- a/lib/Providers/Time/HttpTimeProvider.php +++ b/lib/Providers/Time/HttpTimeProvider.php @@ -12,19 +12,16 @@ use Exception; */ class HttpTimeProvider implements ITimeProvider { - /** @var array */ - public array $options; - /** * @param array $options */ public function __construct( public string $url = 'https://google.com', public string $expectedtimeformat = 'D, d M Y H:i:s O+', - ?array $options = null, + public ?array $options = null, ) { - if ($options === null) { - $options = array( + if ($this->options === null) { + $this->options = array( 'http' => array( 'method' => 'HEAD', 'follow_location' => false, @@ -39,7 +36,6 @@ class HttpTimeProvider implements ITimeProvider ), ); } - $this->options = $options; } /**