5 class Repository_Commit
9 public $committerEmail;
10 public $committerTime;
17 public function getIconUrl()
19 $hh = new HtmlHelper();
20 return $hh->getIconUrl($this->committerEmail);
24 * @return array Array with 7 fields, each has either "r", "g" or "n"
25 * ("red", "green" or "none")
27 public function getDots()
29 $r = $this->getDotNum($this->linesDeleted);
30 $g = $this->getDotNum($this->linesAdded);
33 $quot = ceil($sum / 7);
34 $r = intval($r / $quot);
35 $g = intval($g / $quot);
37 $string = str_repeat('g', $g)
39 . str_repeat('n', 7 - $g - $r);
41 return str_split($string);
44 public function getDotNum($lines)
48 } else if ($lines == 1) {
50 } else if ($lines == 2) {
52 } else if ($lines == 3) {
54 } else if ($lines == 4) {
56 } else if ($lines < 10) {
58 } else if ($lines < 50) {