NotGiveAFuck::lolify()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 2
Bugs 1 Features 1
Metric Value
c 2
b 1
f 1
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
cc 2
eloc 4
nc 2
nop 1
crap 2
1
<?php
2
3
namespace Monolol\Lolifiers;
4
5
use Monolol\Lolifier;
6
use Monolog\Logger;
7
8
class NotGiveAFuck implements Lolifier
9
{
10
    const
11
        MESSAGE = "It seems that your application has encountered an issue. But as we don't give a fuck, we will not tell you what the problem is. Have a good day.";
12
    
13 1
    public function isHandling(array $record)
14
    {
15 1
        return true;
16
    }
17
    
18 8
    public function lolify(array $record)
19
    {
20 8
        if($record['level'] > Logger::INFO)
21 8
        {
22 6
            $record['message'] = self::MESSAGE;
23 6
        }
24
        
25 8
        return $record;
26
    }
27
}
28