Yolo   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 3
c 2
b 1
f 0
lcom 1
cbo 0
dl 0
loc 23
ccs 9
cts 9
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isHandling() 0 4 1
A lolify() 0 4 1
A __construct() 0 7 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