Completed
Branch develop (619864)
by Michael
05:01
created

Logger   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A log() 0 4 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
 * @version 1.0.0
9
 */
10
11
namespace miBadger\Log;
12
13
use miBadger\Observer\SubjectInterface;
14
use miBadger\Observer\SubjectTrait;
15
use Psr\Log\AbstractLogger;
16
17
/**
18
 * The logger implementation of the PSR-3 logger interface.
19
 *
20
 * @see http://www.php-fig.org/psr/psr-3/
21
 * @see http://tools.ietf.org/html/rfc5424
22
 * @since 3.0.0
23
 */
24
class Logger extends AbstractLogger implements SubjectInterface
25
{
26
	use SubjectTrait;
27
28
	/**
29
	 * Construct a logger object.
30
	 */
31 11
	public function __construct()
32
	{
33
34 11
	}
35
36
	/**
37
	 * {@inheritdoc}
38
	 */
39 9
	public function log($level, $message, array $context = [])
40
	{
41 9
		$this->notify(new LogRecord($level, $message, $context));
42 9
	}
43
}
44