Passed
Branch master (5c167b)
by smiley
02:26
created

DatabaseLog   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 22
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A __log() 0 1 1
1
<?php
2
/**
3
 * Class DatabaseLog
4
 *
5
 * @filesource   DatabaseLog.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
use chillerlan\Database\Connection;
16
use chillerlan\Logger\LogOptions;
17
18
/**
19
 */
20
class DatabaseLog extends LogOutputAbstract{
21
22
	/**
23
	 * @var \chillerlan\Database\Connection
24
	 */
25
	protected $db;
26
27
	/** @noinspection PhpMissingParentConstructorInspection */
28
	/**
29
	 * DatabaseLog constructor.
30
	 *
31
	 * @param \chillerlan\Logger\LogOptions $options
32
	 * @param \chillerlan\Database\Connection    $db
33
	 */
34
	public function __construct(LogOptions $options, Connection $db){
35
		$this->options = $options;
36
		$this->db      = $db;
37
38
		$this->db->connect();
39
	}
40
41
	protected function __log(string $level, string $message, array $context = null){
42
		// TODO: Implement log() method.
43
	}
44
}
45