Simple   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A log() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arnaud
5
 * Date: 04/11/15
6
 * Time: 20:13
7
 */
8
9
namespace Ndrx\Profiler\Components\Logs;
10
11
use Ndrx\Profiler\Events\DispatcherAwareInterface;
12
use Ndrx\Profiler\Events\DispatcherAwareTrait;
13
use Ndrx\Profiler\Events\Log;
14
use Psr\Log\AbstractLogger;
15
use Psr\Log\LoggerInterface;
16
17
class Simple extends AbstractLogger implements DispatcherAwareInterface, LoggerInterface
18
{
19
    use DispatcherAwareTrait;
20
21
    /**
22
     * Logs with an arbitrary level.
23
     *
24
     * @param mixed $level
25
     * @param string $message
26
     * @param array $context
27
     * @return null
28
     */
29 2
    public function log($level, $message, array $context = array())
30
    {
31 2
        $this->dispatcher->dispatch(Log::EVENT_NAME, new Log($level, $message, $context, []));
32 2
    }
33
}
34