DateHelper   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 16
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isWeekend() 0 8 4
1
<?php
2
3
namespace TrelloBurndown\Helper;
4
5
/**
6
 * Trait DateHelper.
7
 */
8
trait DateHelper
9
{
10
    /**
11
     * @param \DateTime $date
12
     *
13
     * @return bool
14
     */
15 6
    public function isWeekend(\DateTime $date)
16
    {
17 6
        if ($date instanceof \DateTime && ($date->format('N') == 6 || $date->format('N') == 7)) {
18 6
            return true;
19
        }
20
21 6
        return false;
22
    }
23
}
24