mirror of
https://github.com/antonkomarev/github-profile-views-counter.git
synced 2026-08-04 02:55:11 -04:00
Rename Database repository to Pdo repository
This commit is contained in:
@@ -12,4 +12,4 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'file-repository.php';
|
||||
//require 'database-repository.php';
|
||||
//require 'pdo-repository.php';
|
||||
|
||||
@@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||
use Dotenv\Dotenv;
|
||||
use Dotenv\Exception\InvalidPathException;
|
||||
use Komarev\GitHubProfileViewsCounter\BadgeImageRendererService;
|
||||
use Komarev\GitHubProfileViewsCounter\CounterDatabaseRepository;
|
||||
use Komarev\GitHubProfileViewsCounter\CounterPdoRepository;
|
||||
use Komarev\GitHubProfileViewsCounter\Username;
|
||||
|
||||
$basePath = realpath(__DIR__ . '/..');
|
||||
@@ -62,7 +62,7 @@ try {
|
||||
];
|
||||
$dbConnection = new PDO($dsn, $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $dbConnectionOptions);
|
||||
|
||||
$counterRepository = new CounterDatabaseRepository($dbConnection);
|
||||
$counterRepository = new CounterPdoRepository($dbConnection);
|
||||
$counterRepository->addViewByUsername($username);
|
||||
|
||||
if ($style === 'pixel') {
|
||||
@@ -16,7 +16,7 @@ namespace Komarev\GitHubProfileViewsCounter;
|
||||
use Contracts\Komarev\GitHubProfileViewsCounter\CounterRepositoryInterface;
|
||||
use PDO;
|
||||
|
||||
final class CounterDatabaseRepository implements
|
||||
final class CounterPdoRepository implements
|
||||
CounterRepositoryInterface
|
||||
{
|
||||
private PDO $connection;
|
||||
Reference in New Issue
Block a user