Skip to content

Commit de09914

Browse files
committed
phpcs fixes
Signed-off-by: Joey Smith <jsmith@webinertia.net> Signed-off-by: Joey Smith <jsmith@webinertia.net>
1 parent 52b6345 commit de09914

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

src/Sql/Platform/Ddl/AlterTableDecorator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpDb\Adapter\Sqlite\Sql\Platform\Ddl;
46

57
use PhpDb\Adapter\Platform\PlatformInterface;

src/Sql/Platform/Ddl/CreateTableDecorator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpDb\Adapter\Sqlite\Sql\Platform\Ddl;
46

57
use PhpDb\Adapter\Platform\PlatformInterface;

src/Sql/Platform/SelectDecorator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpDb\Adapter\Sqlite\Sql\Platform;
46

57
use PhpDb\Adapter\Driver\DriverInterface;

src/Sql/Platform/Sqlite.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpDb\Adapter\Sqlite\Sql\Platform;
46

57
use PhpDb\Sql\Ddl\AlterTable;

test/integration/Driver/Pdo/AbstractAdapterTestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpDbIntegrationTest\Adapter\Sqlite\Driver\Pdo;
46

57
use PhpDb\Adapter\AdapterInterface;

test/integration/Driver/Pdo/ConnectionIntegrationTest.php

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,21 @@ public function testDisconnect(): void
7575
self::assertFalse($connection->isConnected());
7676
}
7777

78-
/**
79-
* @todo Implement testBeginTransaction().
80-
*/
78+
public function testConnectReturnsConnectionWhenResourceSet(): void
79+
{
80+
/** @var PDO $resource */
81+
$resource = $this->getAdapter()->getDriver()->getConnection()->getResource();
82+
/** @var PdoConnectionInterface&Connection $connection */
83+
$connection = $this->getAdapter()->getDriver()->getConnection();
84+
self::assertInstanceOf(PdoConnectionInterface::class, $connection);
85+
$connection->setResource($resource);
86+
self::assertSame($connection, $connection->connect());
87+
88+
$connection->disconnect();
89+
unset($connection);
90+
unset($resource);
91+
}
92+
8193
// public function testBeginTransaction(): never
8294
// {
8395
// // Remove the following lines when you implement this test.
@@ -86,9 +98,6 @@ public function testDisconnect(): void
8698
// );
8799
// }
88100

89-
/**
90-
* @todo Implement testCommit().
91-
*/
92101
// public function testCommit(): never
93102
// {
94103
// // Remove the following lines when you implement this test.
@@ -97,9 +106,6 @@ public function testDisconnect(): void
97106
// );
98107
// }
99108

100-
/**
101-
* @todo Implement testRollback().
102-
*/
103109
// public function testRollback(): never
104110
// {
105111
// // Remove the following lines when you implement this test.
@@ -114,19 +120,4 @@ public function testDisconnect(): void
114120
// //$connection = new Connection($this->variables);
115121
// //$connection->getLastGeneratedValue();
116122
// }
117-
118-
public function testConnectReturnsConnectionWhenResourceSet(): void
119-
{
120-
/** @var PDO $resource */
121-
$resource = $this->getAdapter()->getDriver()->getConnection()->getResource();
122-
/** @var PdoConnectionInterface&Connection $connection */
123-
$connection = $this->getAdapter()->getDriver()->getConnection();
124-
self::assertInstanceOf(PdoConnectionInterface::class, $connection);
125-
$connection->setResource($resource);
126-
self::assertSame($connection, $connection->connect());
127-
128-
$connection->disconnect();
129-
unset($connection);
130-
unset($resource);
131-
}
132123
}

0 commit comments

Comments
 (0)