Skip to content

Commit

Permalink
Add code coverage tags
Browse files Browse the repository at this point in the history
- Unreachable lines taken out from code coverage.
  • Loading branch information
DigiLive committed Nov 3, 2020
1 parent a4890bc commit 7ce91b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/GitChangelog.php
Expand Up @@ -119,7 +119,7 @@ class GitChangelog
'includeMergeCommits' => false,
'tagOrderBy' => 'creatordate',
'tagOrderDesc' => true,
'commitOrder' => 'ASC',
'commitOrder' => 'ASC', //TODO: Refactor to 'subjectOrder'
];
/**
* @var string Value of the oldest tag to include into the generated changelog. If the value is null it refers to
Expand Down Expand Up @@ -196,7 +196,9 @@ public function fetchTags($force = false): array
$commandResult = 1;
exec("git $gitPath tag --sort=-{$this->options['tagOrderBy']}", $this->gitTags, $commandResult);
if ($commandResult !== 0) {
// @codeCoverageIgnoreStart
throw new RuntimeException('An error occurred while fetching the tags from the repository!');
// @codeCoverageIgnoreEnd
}

// Add HEAD revision as tag.
Expand Down Expand Up @@ -277,7 +279,9 @@ public function fetchCommitData($force = false): array
}

if (array_sum($commandResults)) {
// @codeCoverageIgnoreStart
throw new RuntimeException('An error occurred while fetching the commit data from the repository.');
// @codeCoverageIgnoreEnd
}

// Cache commit data and process it.
Expand Down

0 comments on commit 7ce91b8

Please sign in to comment.