Logger::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 1
cts 1
cp 1
crap 1
rs 10
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