📚 doc blocks

This commit is contained in:
William Hall
2021-03-08 18:21:15 +00:00
parent 452d31bfbf
commit 33a32cb099
27 changed files with 378 additions and 7 deletions
+17 -4
View File
@@ -9,17 +9,26 @@ use DateTime;
*/
class HttpTimeProvider implements ITimeProvider
{
/** @var string */
public $url;
public $options;
/** @var string */
public $expectedtimeformat;
/** @var array */
public $options;
/**
* @param string $url
* @param string $expectedtimeformat
* @param array $options
*/
public function __construct($url = 'https://google.com', $expectedtimeformat = 'D, d M Y H:i:s O+', array $options = null)
{
$this->url = $url;
$this->expectedtimeformat = $expectedtimeformat;
$this->options = $options;
if ($this->options === null) {
$this->options = array(
if ($options === null) {
$options = array(
'http' => array(
'method' => 'HEAD',
'follow_location' => false,
@@ -34,8 +43,12 @@ class HttpTimeProvider implements ITimeProvider
)
);
}
$this->options = $options;
}
/**
* {@inheritdoc}
*/
public function getTime()
{
try {