Conditions | 5 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5.9256 |
Changes | 0 |
1 | <?php |
||
26 | 2 | public function run(History $history) |
|
27 | { |
||
28 | 2 | $tag = $history->getFirstTag(); |
|
29 | 2 | $notes = $tag->getNotes(); |
|
30 | 2 | if (count($notes) > 1) { |
|
31 | return; |
||
32 | } |
||
33 | 2 | if (count($notes) > 0) { |
|
34 | 2 | $note = reset($notes); |
|
35 | 2 | if ($note->getNote() || count($note->getCommits()) > 0) { |
|
36 | 2 | return; |
|
37 | } |
||
38 | } |
||
39 | $history->removeTag($tag->getName()); |
||
40 | } |
||
41 | } |
||
42 |