Skip to content

Commit 8b0318f

Browse files
authored
Merge pull request #2 from kongoncharuk/master
Type hinting
2 parents 362ca19 + b1a6c2d commit 8b0318f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Asset/GitVersionStrategy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ public function __construct($format)
1515
$this->commitHash = $this->getCommitHash();
1616
}
1717

18-
public function getVersion($path = null)
18+
public function getVersion(string $path = null): string
1919
{
2020
return $this->commitHash;
2121
}
2222

23-
public function applyVersion($path)
23+
public function applyVersion(string $path): string
2424
{
2525
$version = $this->getVersion();
2626

@@ -31,7 +31,7 @@ public function applyVersion($path)
3131
return sprintf($this->format, $path, $version);
3232
}
3333

34-
protected function getCommitHash()
34+
protected function getCommitHash(): string
3535
{
3636
return trim(`git rev-parse --short HEAD`);
3737
}

0 commit comments

Comments
 (0)