Browse code

Handle contributor commits in own collections

Niklas Modess authored on 24/05/2014 14:37:57
Showing 1 changed files
... ...
@@ -17,6 +17,11 @@ class Contributors extends Collection implements StatisticsInterface
17 17
         $email      = $commit->getAuthor()->getEmail();
18 18
         $commitDate = $commit->getCommiterDate()->format('Y-m-d');
19 19
 
20
-        $this->items[$email][$commitDate][] = $commit;
20
+        if (!isset($this->items[$email])) {
21
+            $this->items[$email] = new Collection;
22
+        }
23
+
24
+        $commits = $this->items[$email];
25
+        $commits->items[$commitDate][] = $commit;
21 26
     }
22 27
 }
23 28
\ No newline at end of file