Add PDO repository (#2)

* Add PDO repository

* Make file storage path configurable

* Name username query property required

* Add special exception class
This commit is contained in:
Anton Komarev
2020-07-12 18:46:42 +03:00
committed by GitHub
parent 042b26ea71
commit e4f24b04f7
13 changed files with 604 additions and 42 deletions

View File

@@ -13,7 +13,7 @@ declare(strict_types=1);
namespace Komarev\GitHubProfileViewsCounter;
use InvalidArgumentException;
use Contracts\Komarev\GitHubProfileViewsCounter\InvalidPathException;
final class CounterImageRendererService
{
@@ -22,7 +22,7 @@ final class CounterImageRendererService
public function __construct(string $sourceImagePath)
{
if (!file_exists($sourceImagePath)) {
throw new InvalidArgumentException('Counter source image not found');
throw new InvalidPathException('Counter source image not found');
}
$this->sourceImagePath = $sourceImagePath;