Skip to content

Commit

Permalink
Add multiple scripts and a combined script to the composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
tvbeek committed Sep 7, 2021
1 parent 2142e61 commit b96d011
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 10 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@
}
},
"scripts": {
"check-all": [
"@format",
"@codestyle",
"@test-coverage",
"@phpstan",
"@phpmd"
],
"codestyle": "vendor/bin/phpcs",
"format": "vendor/bin/phpcbf",
"phpstan": "vendor/bin/phpstan",
"phpmd": "vendor/bin/phpmd src/ text phpmd.xml.dist",
"test": "vendor/bin/phpunit --no-coverage",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
Expand Down
8 changes: 6 additions & 2 deletions src/Retriever/Retriever.php → src/Retrievers/Retriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@

namespace TJVB\GitHash\Retriever;

use Exception;
use TJVB\GitHash\Contracts\FinderFactory;
use TJVB\GitHash\Contracts\GitHashRetriever;
use TJVB\GitHash\Exceptions\GitHashException;
use TJVB\GitHash\Values\GitHash;

final class Retriever implements GitHashRetriever
{

private ?FinderFactory $finderFactory = null;

public function setFinderFactory(FinderFactory $finderFactory): void
{
$this->finderFactory = $finderFactory;
}

public function getFinderFactory(): ?FinderFactory
{
return $this->finderFactory;
}

public function getHash(string $path): GitHash
{
if ($this->finderFactory === null) {
Expand Down

0 comments on commit b96d011

Please sign in to comment.