Skip to content

Commit

Permalink
fix return type of getCommit()
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Mitterhauser committed Apr 24, 2024
1 parent 99f8aa8 commit 8bd844a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
cacheResult="false"
stopOnError="false"
stopOnFailure="false"
>
Expand Down
4 changes: 2 additions & 2 deletions src/GitVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public function getBranch(): ?string

/**
* Get the latest commit ID.
* @return string
* @return string|null
*/
public function getCommit(): string
public function getCommit(): ?string
{
if ($this->commit === null && $this->isRepo()) {
/**
Expand Down

0 comments on commit 8bd844a

Please sign in to comment.