| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | 27 | public function getCommits(): array |
|
| 37 | { |
||
| 38 | 27 | if ($this->config->isHideDoubles()) { |
|
| 39 | 1 | $result = []; |
|
| 40 | 1 | $index = []; |
|
| 41 | 1 | foreach ($this->commits as $commit) { |
|
| 42 | 1 | if (!isset($index[$commit->comment])) { |
|
| 43 | 1 | $result[] = $commit; |
|
| 44 | 1 | $index[$commit->comment] = true; |
|
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 48 | 1 | return $result; |
|
| 49 | } |
||
| 50 | |||
| 51 | 26 | return $this->commits; |
|
| 52 | } |
||
| 59 |