Completed
Push — master ( ea2a4b...ce5c76 )
by Jeroen De
02:55 queued 47s
created

LogCall::getMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\PsrLogTestDoubles;
6
7
/**
8
 * Value object representing a call to the logger
9
 *
10
 * @licence GNU GPL v2+
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class LogCall {
14
15
	private $level;
16
	private $message;
17
	private $context;
18
19
	/**
20
	 * @param mixed $level Typically one of the @see LogLevel constants
21
	 * @param string $message
22
	 * @param array $context
23
	 */
24 4
	public function __construct( $level, string $message, array $context = [] ) {
25 4
		$this->level = $level;
26 4
		$this->message = $message;
27 4
		$this->context = $context;
28 4
	}
29
30
	/**
31
	 * @return mixed Typically one of the @see LogLevel constants
32
	 */
33 1
	public function getLevel() {
34 1
		return $this->level;
35
	}
36
37 2
	public function getMessage(): string {
38 2
		return $this->message;
39
	}
40
41 1
	public function getContext(): array {
42 1
		return $this->context;
43
	}
44
45
}
46