Completed
Push — feature/issue-7 ( 9d75a7...1ff64b )
by Mikaël
03:36
created

Expires   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 20
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace WsdlToPhp\WsSecurity;
4
5
class Expires extends Element
6
{
7
    /**
8
     * Element name.
9
     *
10
     * @var string
11
     */
12
    const NAME = 'Expires';
13
14
    /**
15
     * Constructor for Expires element.
16
     *
17
     * @param int    $timestamp the timestamp value
18
     * @param int    $expiresIn the expires in time
19
     * @param string $namespace the namespace
20
     */
21 6
    public function __construct($timestamp, $expiresIn = 3600, $namespace = self::NS_WSSU)
22
    {
23 6
        $this->setTimestampValue($timestamp + $expiresIn);
24 6
        parent::__construct(self::NAME, $namespace, $this->getTimestampValue(true));
25 6
    }
26
}
27