NotGiveAFuck::isHandling()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
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