Skip to content

Commit ccd76ce

Browse files
committed
phpcs fixes
Signed-off-by: Joey Smith <jsmith@webinertia.net> Signed-off-by: Joey Smith <jsmith@webinertia.net>
1 parent 94ef387 commit ccd76ce

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

test/unit/AdapterTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PhpDbTest\Adapter\Sqlite;
66

7+
use Exception;
78
use Override;
89
use PhpDb\Adapter\Adapter;
910
use PhpDb\Adapter\Driver\DriverInterface;
@@ -18,7 +19,6 @@
1819
use PhpDb\ResultSet\ResultSetInterface;
1920
use PHPUnit\Framework\Attributes\CoversMethod;
2021
use PHPUnit\Framework\Attributes\TestDox;
21-
use PHPUnit\Framework\MockObject\Exception;
2222
use PHPUnit\Framework\MockObject\MockObject;
2323
use PHPUnit\Framework\TestCase;
2424

@@ -48,7 +48,7 @@ final class AdapterTest extends TestCase
4848
protected Adapter $adapter;
4949

5050
/**
51-
* @throws \Exception
51+
* @throws Exception
5252
*/
5353
#[Override]
5454
protected function setUp(): void
@@ -105,7 +105,7 @@ public function testGetCurrentSchema(): void
105105
}
106106

107107
/**
108-
* @throws \Exception
108+
* @throws Exception
109109
*/
110110
#[TestDox('unit test: Test query() in prepare mode produces a statement object')]
111111
public function testQueryWhenPreparedProducesStatement(): void
@@ -115,7 +115,7 @@ public function testQueryWhenPreparedProducesStatement(): void
115115
}
116116

117117
/**
118-
* @throws \Exception
118+
* @throws Exception
119119
*/
120120
#[TestDox('unit test: Test query() in prepare mode, with array of parameters, produces a result object')]
121121
public function testQueryWhenPreparedWithParameterArrayProducesResult(): void

test/unit/Driver/Pdo/ConnectionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@
66

77
use Exception;
88
use Override;
9-
use PhpDb\Adapter\Exception\InvalidConnectionParametersException;
109
use PhpDb\Adapter\Sqlite\Driver\Pdo\Connection;
1110
use PHPUnit\Framework\Attributes\CoversMethod;
1211
use PHPUnit\Framework\Attributes\Group;
1312
use PHPUnit\Framework\TestCase;
1413

15-
use function realpath;
16-
1714
#[CoversMethod(Connection::class, 'getResource')]
1815
#[CoversMethod(Connection::class, 'getDsn')]
1916
final class ConnectionTest extends TestCase

test/unit/Platform/SqliteTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
use PhpDb\Adapter\Sqlite\Sql\Platform\Sqlite as SqlPlatformDecorator;
1111
use PHPUnit\Framework\Attributes\CoversClass;
1212
use PHPUnit\Framework\TestCase;
13-
use ReflectionClass;
13+
14+
use function restore_error_handler;
15+
use function set_error_handler;
16+
17+
use const E_USER_NOTICE;
1418

1519
#[CoversClass(Sqlite::class)]
1620
final class SqliteTest extends TestCase
@@ -19,7 +23,7 @@ final class SqliteTest extends TestCase
1923

2024
protected function setUp(): void
2125
{
22-
$pdoMock = $this->createMock(PDO::class);
26+
$pdoMock = $this->createMock(PDO::class);
2327
$this->platform = new Sqlite($pdoMock);
2428
}
2529

0 commit comments

Comments
 (0)