Symfony   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 47
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A error() 0 4 1
A warning() 0 4 1
A note() 0 4 1
A caution() 0 4 1
1
<?php
2
/**
3
 * Symfony.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        http://www.ipublikuj.eu
7
 * @author         Adam Kadlec http://www.ipublikuj.eu
8
 * @package        iPublikuj:MQTTClient!
9
 * @subpackage     Logger
10
 * @since          1.0.0
11
 *
12
 * @date           26.02.17
13
 */
14
15
declare(strict_types = 1);
16
17
namespace IPub\MQTTClient\Logger\Formatter;
18
19
use Symfony\Component\Console;
20
21
/**
22
 * Client server symfony console output formatter
23
 *
24
 * @package        iPublikuj:MQTTClient!
25
 * @subpackage     Logger
26
 *
27
 * @author         Adam Kadlec <[email protected]>
28
 */
29
final class Symfony implements IFormatter
30
{
31
	/**
32
	 * @var Console\Style\SymfonyStyle
33
	 */
34
	private $output;
35
36
	/**
37
	 * @param Console\Style\SymfonyStyle $output
38
	 */
39
	public function __construct(Console\Style\SymfonyStyle $output)
40
	{
41
		$this->output = $output;
42
	}
43
44
	/**
45
	 * {@inheritdoc}
46
	 */
47
	public function error(string $message)
48
	{
49
		$this->output->error($message);
50
	}
51
52
	/**
53
	 * {@inheritdoc}
54
	 */
55
	public function warning(string $message)
56
	{
57
		$this->output->warning($message);
58
	}
59
60
	/**
61
	 * {@inheritdoc}
62
	 */
63
	public function note(string $message)
64
	{
65
		$this->output->note($message);
66
	}
67
68
	/**
69
	 * {@inheritdoc}
70
	 */
71
	public function caution(string $message)
72
	{
73
		$this->output->caution($message);
74
	}
75
}
76