Conditions | 8 |
Paths | 25 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 33.2361 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 2 | public function run(History $history) |
|
26 | { |
||
27 | 2 | foreach (array_reverse($history->getConfig()->getAuthors()) as $nick => $data) { |
|
28 | if (strncmp($nick, '@', 1)) { |
||
29 | $nick = '@' . $nick; |
||
30 | } |
||
31 | $href = !empty($data['github']) ? $data['github'] : |
||
32 | (!empty($data['homepage']) ? $data['homepage'] : null); |
||
33 | if ($history->hasLink($nick) || empty($href)) { |
||
34 | continue; |
||
35 | } |
||
36 | |||
37 | if (!empty($data['email'])) { |
||
38 | $history->unshiftLink($data['email'], $href); |
||
39 | } |
||
40 | $history->unshiftLink($nick, $href); |
||
41 | 2 | } |
|
42 | 2 | } |
|
43 | } |
||
44 |