Skip to content

Commit

Permalink
style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdef committed Jan 2, 2024
1 parent 1c4e3f5 commit e81d7a8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Driver/Pdo/AbstractPdoConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ public function close(): void
{
if ($this->pdo !== null) {
$this->logger?->log(
DbLoggerEvent::CONNECTION_BEGIN,
DbLoggerEvent::CONNECTION_END,
new LoggerContext(__METHOD__, $this->getDriver()->getDsn()),
);
);

$this->pdo = null;
$this->transaction = null;
Expand Down
1 change: 1 addition & 0 deletions src/Logger/ContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ interface ContextInterface
public function getMethodName(): string;

public function getException(): Throwable|null;

public function setException(Throwable $e): static;
}
1 change: 0 additions & 1 deletion src/Logger/DbLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Psr\Log\LoggerInterface as PsrLoggerInterface;
use Psr\Log\LogLevel;
use Throwable;
use Yiisoft\Db\Exception\NotSupportedException;
use Yiisoft\Db\Logger\Context\ConnectionContext;
use Yiisoft\Db\Logger\Context\QueryContext;
use Yiisoft\Db\Logger\Context\TransactionContext;
Expand Down
2 changes: 2 additions & 0 deletions src/Logger/DbLoggerAwareInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Yiisoft\Db\Logger;

use Psr\Log\LoggerInterface as PsrLoggerInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Logger/DbLoggerEvent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Yiisoft\Db\Logger;

class DbLoggerEvent
Expand Down
3 changes: 2 additions & 1 deletion src/Logger/DbLoggerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

namespace Yiisoft\Db\Logger;

interface DbLoggerInterface {
interface DbLoggerInterface
{

/**
* @param string $logEvent
Expand Down

0 comments on commit e81d7a8

Please sign in to comment.