5 class Repository_Commit
9 public $committerEmail;
10 public $committerTime;
17 public function getIconUrl()
19 if ($this->committerEmail == 'anonymous@phorkie') {
20 return '/phorkie/anonymous.png';
23 $s = new \Services_Libravatar();
25 $this->committerEmail,
28 'default' => Tools::fullUrl('/phorkie/anonymous.png')
34 * @return array Array with 7 fields, each has either "r", "g" or "n"
35 * ("red", "green" or "none")
37 public function getDots()
39 $r = $this->getDotNum($this->linesDeleted);
40 $g = $this->getDotNum($this->linesAdded);
43 $quot = ceil($sum / 7);
44 $r = intval($r / $quot);
45 $g = intval($g / $quot);
47 $string = str_repeat('g', $g)
49 . str_repeat('n', 7 - $g - $r);
51 return str_split($string);
54 public function getDotNum($lines)
58 } else if ($lines == 1) {
60 } else if ($lines == 2) {
62 } else if ($lines == 3) {
64 } else if ($lines == 4) {
66 } else if ($lines < 10) {
68 } else if ($lines < 50) {