| Conditions | 8 |
| Paths | 25 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 46.7792 |
| 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 | } |
|
| 44 |