Code Duplication    Length = 6-6 lines in 2 locations

src/Response/BatchStatus/Details.php 1 location

@@ 45-50 (lines=6) @@
42
     */
43
    public function init() : void
44
    {
45
        if (isset($this->data->sendtime)) {
46
            $this->sendTime = \DateTimeImmutable::createFromFormat('d-m-Y H:i:s', $this->data->sendtime);
47
            if ($this->sendTime === false) {
48
                throw new InvalidResponseException(
49
                    '`sendtime` does not have the correct format. Value given: '.$this->data->sendtime
50
                );
51
            }
52
        }
53

src/Response/BatchStatus/Stat.php 1 location

@@ 34-39 (lines=6) @@
31
     */
32
    public function init() : void
33
    {
34
        if (isset($this->data->sendtime)) {
35
            $this->sendTime = \DateTimeImmutable::createFromFormat('d-m-Y H:i:s', $this->data->sendtime);
36
            if ($this->sendTime === false) {
37
                throw new InvalidResponseException(
38
                    '`sendtime` does not have the correct format. Value given: '.$this->data->sendtime
39
                );
40
            }
41
        }
42