MessageQueue::queueDate()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
/**
4
 * This file is part of the php-epp2 library.
5
 *
6
 * (c) Gunter Grodotzki <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE file
9
 * that was distributed with this source code.
10
 */
11
12
namespace AfriCC\EPP\Frame\Response;
13
14
use AfriCC\EPP\Frame\Response as ResponseFrame;
15
16
class MessageQueue extends ResponseFrame
17
{
18
    public function queueId()
19
    {
20
        return $this->get('//epp:epp/epp:response/epp:msgQ/@id');
21
    }
22
23
    public function queueCount()
24
    {
25
        return (int) $this->get('//epp:epp/epp:response/epp:msgQ/@count');
26
    }
27
28
    public function queueMessage()
29
    {
30
        return $this->get('//epp:epp/epp:response/epp:msgQ/epp:msg/text()');
31
    }
32
33
    public function queueDate($format = null)
34
    {
35
        if ($format) {
36
            return date($format, strtotime($this->get('//epp:epp/epp:response/epp:msgQ/epp:qDate/text()')));
37
        }
38
39
        return $this->get('//epp:epp/epp:response/epp:msgQ/epp:qDate/text()');
40
    }
41
}
42