NullLogger::__log()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 1
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 0
nc 1
nop 3
crap 2
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