Passed
Push — master ( b97787...c0f601 )
by Jean-Christophe
16:10
created

HtmlLogFormatter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getIcon() 0 2 1
A getFormat() 0 2 1
1
<?php
2
3
namespace Ubiquity\log;
4
5
class HtmlLogFormatter {
6
	private static $icons=[100=>"",200=>"blue info circle",300=>"orange warning circle",400=>"exclamation triangle",500=>"thumbs down outline",550=>"thumbs down",600=>"ban"];
7
	private static $format=[100=>"",200=>"info",300=>"warning",400=>"error",500=>"error",550=>"error",600=>"error"];
8
9 1
	public static function getIcon(LogMessage $message){
10 1
		return self::$icons[$message->getLevel()];
11
	}
12
	
13 1
	public static function getFormat(LogMessage $message){
14 1
		return self::$format[$message->getLevel()];
15
	}
16
}
17