GeekTime   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 80%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A lolify() 0 4 1
A isHandling() 0 6 1
A isGeekTime() 0 9 2
1
<?php
2
3
namespace Monolol\Lolifiers;
4
5
use Monolol\Lolifier;
6
7
class GeekTime implements Lolifier
8
{
9 5
    public function isHandling(array $record)
10
    {
11 5
        $dateTime = $record['datetime'];
12
13 5
        return $this->isGeekTime($dateTime);
14
    }
15
    
16
    public function lolify(array $record)
17
    {
18
        return $record;
19
    }
20
    
21 5
    private function isGeekTime(\Datetime $dateTime)
22
    {
23 5
        if($dateTime->format('H:i') == '13:37')
24 5
        {
25 2
            return true;
26
        }
27
        
28 3
        return false;
29
    }
30
}
31