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

PsrLogger::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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