TExpire::getExpireTime()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace kalanis\kw_accounts\Data;
4
5
6
/**
7
 * Trait TExpire
8
 * @package kalanis\kw_accounts\Data
9
 * Expiration
10
 */
11
trait TExpire
12
{
13
    protected bool $showNotice = false;
14
    protected int $expireTime = 0;
15
16 1
    public function setExpireNotice(bool $expiry): void
17
    {
18 1
        $this->showNotice = $expiry;
19 1
    }
20
21 1
    public function willExpire(): bool
22
    {
23 1
        return $this->showNotice;
24
    }
25
26 1
    public function getExpireTime(): int
27
    {
28 1
        return $this->expireTime;
29
    }
30
31 1
    public function updateExpireTime(int $expireTime): void
32
    {
33 1
        $this->expireTime = $expireTime;
34 1
    }
35
}
36