Completed
Pull Request — master (#2)
by Tomáš
09:22
created

PsrLogger   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 41
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 Psr;
8
use Nette;
9
10
final class PsrLogger implements ILogger
11
{
12
	use Nette\SmartObject;
13
14
	/** @var \Psr\Log\LoggerInterface  */
15
	private $logger;
16
17
	/**
18
	 * @param \Psr\Log\LoggerInterface $logger
19
	 */
20
	public function __construct(Psr\Log\LoggerInterface $logger)
21
	{
22
		$this->logger = $logger;
23
	}
24
25
	/*************** interface \SixtyEightPublishers\User\Common\Logger\ILogger ***************/
26
27
	/**
28
	 * {@inheritdoc}
29
	 */
30
	public function error(string $message): void
31
	{
32
		$this->logger->error($message);
33
	}
34
35
	/**
36
	 * {@inheritdoc}
37
	 */
38
	public function notice(string $message): void
39
	{
40
		$this->logger->notice($message);
41
	}
42
43
	/**
44
	 * {@inheritdoc}
45
	 */
46
	public function info(string $message): void
47
	{
48
		$this->logger->info($message);
49
	}
50
}
51