WriteReviewNotice   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
eloc 9
dl 0
loc 26
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A canRender() 0 9 3
A version() 0 3 1
A isMonitored() 0 3 1
A isIntroverted() 0 3 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Notices;
4
5
class WriteReviewNotice extends AbstractNotice
6
{
7
    protected function canRender(): bool
8
    {
9
        if (!parent::canRender()) {
10
            return false;
11
        }
12
        if ($this->futureTime() >= time()) {
13
            return false;
14
        }
15
        return true;
16
    }
17
18
    protected function isIntroverted(): bool
19
    {
20
        return true;
21
    }
22
23
    protected function isMonitored(): bool
24
    {
25
        return false;
26
    }
27
28
    protected function version(): string
29
    {
30
        return glsr()->version('major');
31
    }
32
}
33