NullLogger   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 1
dl 0
loc 3
ccs 0
cts 1
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __log() 0 1 1
1
<?php
2
/**
3
 * Class NullLogger
4
 *
5
 * @filesource   NullLogger.php
6
 * @created      04.01.2018
7
 * @package      chillerlan\Logger\Output
8
 * @author       Smiley <[email protected]>
9
 * @copyright    2018 Smiley
10
 * @license      MIT
11
 */
12
13
namespace chillerlan\Logger\Output;
14
15
/**
16
 * This Logger can be used to avoid conditional log calls.
17
 *
18
 * Logging should always be optional, and if no logger is provided to your
19
 * library creating a NullLogger instance to have something to throw logs at
20
 * is a good way to avoid littering your code with `if ($this->logger) { }`
21
 * blocks.
22
 */
23
class NullLogger extends LogOutputAbstract{
24
25
	protected function __log(string $level, string $message, array $context = null){
26
		// go along, nothing to see here.
27
	}
28
29
}
30