Yolo::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Monolol\Lolifiers;
4
5
use Monolol\Lolifier;
6
use Monolog\Logger;
7
8
class Yolo implements Lolifier
9
{
10
    private
11
        $acceptedLevels;
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $acceptedLevels.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
12
        
13 10
    public function __construct()
14
    {
15 10
        $this->acceptedLevels = array(
16 10
            Logger::DEBUG,
17 10
            Logger::INFO,
18
        );
19 10
    }    
20
        
21 8
    public function isHandling(array $record)
22
    {
23 8
        return in_array($record['level'], $this->acceptedLevels);
24
    }
25
    
26 1
    public function lolify(array $record)
27
    {
28 1
        return $record;
29
    }
30
}
31
32