| Conditions | 8 |
| Paths | 11 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 8 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 2 | public function run(History $history) |
|
| 24 | { |
||
| 25 | 2 | if (!$history->hasTag($history->initTag)) { |
|
| 26 | 1 | $min = ''; |
|
| 27 | 1 | foreach ($history->getTags() as $tag) { |
|
| 28 | 1 | foreach ($tag->getNotes() as $note) { |
|
| 29 | 1 | foreach ($note->getCommits() as $commit) { |
|
| 30 | 1 | $date = $commit->getDate(); |
|
| 31 | 1 | if (!$min || strcmp($date, $min) < 0) { |
|
| 32 | 1 | $min = $date; |
|
| 33 | 1 | } |
|
| 34 | 1 | } |
|
| 35 | 1 | } |
|
| 36 | 1 | } |
|
| 37 | 1 | if ($min) { |
|
| 38 | 1 | $history->addTag(new Tag($history->initTag, $min)); |
|
| 39 | 1 | } |
|
| 43 |