PsrLogger   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 39
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A error() 0 4 1
A notice() 0 4 1
A info() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SixtyEightPublishers\User\Common\Logger;
6
7
use Nette\SmartObject;
8
use Psr\Log\LoggerInterface as PsrLoggerInterface;
9
10
final class PsrLogger implements LoggerInterface
11
{
12
	use SmartObject;
13
14
	/** @var \Psr\Log\LoggerInterface  */
15
	private $logger;
16
17
	/**
18
	 * @param \Psr\Log\LoggerInterface $logger
19
	 */
20
	public function __construct(PsrLoggerInterface $logger)
21
	{
22
		$this->logger = $logger;
23
	}
24
25
	/**
26
	 * {@inheritdoc}
27
	 */
28
	public function error(string $message): void
29
	{
30
		$this->logger->error($message);
31
	}
32
33
	/**
34
	 * {@inheritdoc}
35
	 */
36
	public function notice(string $message): void
37
	{
38
		$this->logger->notice($message);
39
	}
40
41
	/**
42
	 * {@inheritdoc}
43
	 */
44
	public function info(string $message): void
45
	{
46
		$this->logger->info($message);
47
	}
48
}
49