Passed
Push — master ( f45dbf...be86df )
by Jean-Christophe
09:49
created

HtmlLogFormatter::getFormat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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