Passed
Push — master ( f63d0b...f41ba3 )
by Jean-Christophe
10:17
created

GitFileStatus::getIcon()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 16
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 16
cp 0
rs 9.7998
cc 4
nc 4
nop 1
crap 20
1
<?php
2
3
namespace Ubiquity\utils\git;
4
5
class GitFileStatus {
6
	public static $UNTRACKED="untracked";
7
	public static $MODIFIED="modified";
8
	public static $DELETED="deleted";
9
	public static $NONE="";
10
	public static function getIcon($status){
11
		switch ($status){
12
			case self::$UNTRACKED:
13
				$icon="blue question";
14
				break;
15
			case self::$MODIFIED:
16
				$icon="green edit";
17
				break;
18
			case self::$DELETED:
19
				$icon="red remove";
20
				break;
21
			default:
22
				$icon="red question";
23
				break;
24
		}
25
		return $icon;
26
	}
27
}
28
29