Logger   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 18
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A log() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of the miBadger package.
5
 *
6
 * @author Michael Webbers <[email protected]>
7
 * @license http://opensource.org/licenses/Apache-2.0 Apache v2 License
8
 */
9
10
namespace miBadger\Log;
11
12
use miBadger\Observer\SubjectInterface;
13
use miBadger\Observer\SubjectTrait;
14
use Psr\Log\AbstractLogger;
15
16
/**
17
 * The logger implementation of the PSR-3 logger interface.
18
 *
19
 * @see http://www.php-fig.org/psr/psr-3/
20
 * @see http://tools.ietf.org/html/rfc5424
21
 * @since 3.0.0
22
 */
23
class Logger extends AbstractLogger implements SubjectInterface
24
{
25
	use SubjectTrait;
26
27
	/**
28
	 * Construct a logger object.
29
	 */
30 11
	public function __construct()
31
	{
32
33 11
	}
34
35
	/**
36
	 * {@inheritdoc}
37
	 */
38 9
	public function log($level, $message, array $context = [])
39
	{
40 9
		$this->notify(new LogRecord($level, $message, $context));
41 9
	}
42
}
43