5 class Repository_Commit
9 public $committerEmail;
10 public $committerTime;
17 public function getIconUrl()
19 //workaround for https://pear.php.net/bugs/bug.php?id=19384
20 require_once 'PEAR/Services/Libravatar.php';
22 $s = new \Services_Libravatar();
23 return $s->url('cweiske@cweiske.de'/*$this->committerEmail*/, array('s' => 32));
27 * @return array Array with 7 fields, each has either "r", "g" or "n"
28 * ("red", "green" or "none")
30 public function getDots()
32 $r = $this->getDotNum($this->linesDeleted);
33 $g = $this->getDotNum($this->linesAdded);
36 $quot = ceil($sum / 7);
40 $string = str_repeat('g', $g) . str_repeat('r', $r) . str_repeat('n', 7 - $g - $r);
42 return str_split($string);
45 public function getDotNum($lines)
49 } else if ($lines == 1) {
51 } else if ($lines == 2) {
53 } else if ($lines == 3) {
55 } else if ($lines == 4) {
57 } else if ($lines < 10) {
59 } else if ($lines < 50) {