Completed
Push — master ( 2dd332...d6426f )
by steef
02:53
created

RefugeeDay   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 87.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 14
ccs 7
cts 8
cp 0.875
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 11 2
1
<?php
2
3
namespace Stefanius\SpecialDates\Dates;
4
5
use Stefanius\SpecialDates\SDK\AbstractSpecialDate;
6
7
class RefugeeDay extends AbstractSpecialDate
8
{
9 3
    protected function generate()
10
    {
11 3
        $this->description = 'Wereldvluchtelingendag';
12
13 3
        if ($this->year >= 2000) {
14 3
            $this->setupDateTimeObjects($this->generateDateTime($this->year, 6, 20));
15 3
            $this->valid = true;
16 3
        } else {
17
            $this->valid = false;
18
        }
19 3
    }
20
}
21