Total Complexity | 3 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class ResponseHeader { |
||
21 | /** |
||
22 | * The combined date and time in UTC (ISO8601). |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | private $request_timestamp; |
||
27 | |||
28 | /** |
||
29 | * Construct and initialize request header. |
||
30 | * |
||
31 | * @param string $timestamp Request timestamp. |
||
32 | */ |
||
33 | 5 | public function __construct( $timestamp ) { |
|
34 | 5 | $this->request_timestamp = $timestamp; |
|
35 | 5 | } |
|
36 | |||
37 | /** |
||
38 | * From JSON. |
||
39 | * |
||
40 | * @link https://github.com/WordPress/wp-notify/blob/develop/includes/JsonUnserializable.php |
||
41 | * @param object $object Object. |
||
42 | * @return self |
||
43 | * @throws \JsonSchema\Exception\ValidationException Throws exception when JSON is not valid. |
||
44 | */ |
||
45 | 3 | public static function from_json( $object ) { |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * Get request timestamp. |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | 1 | public function get_request_timestamp() { |
|
67 | } |
||
68 | } |
||
69 |