diff --git a/lib/Db/AbstractDriver.php b/lib/Db/AbstractDriver.php index 624074cf..2cd89697 100644 --- a/lib/Db/AbstractDriver.php +++ b/lib/Db/AbstractDriver.php @@ -13,7 +13,7 @@ abstract class AbstractDriver implements Driver { protected $transDepth = 0; protected $transStatus = []; - protected abstract function getError(): string; + abstract protected function getError(): string; /** @codeCoverageIgnore */ public function schemaVersion(): int { diff --git a/lib/Db/PDODriver.php b/lib/Db/PDODriver.php index 99dfe675..c6ec0d4b 100644 --- a/lib/Db/PDODriver.php +++ b/lib/Db/PDODriver.php @@ -44,4 +44,4 @@ trait PDODriver { } return new PDOStatement($this->db, $s, $paramTypes); } -} \ No newline at end of file +} diff --git a/lib/Db/PDOError.php b/lib/Db/PDOError.php index 929fe1e1..37341e4f 100644 --- a/lib/Db/PDOError.php +++ b/lib/Db/PDOError.php @@ -28,9 +28,11 @@ trait PDOError { default: return [Exception::class, "engineErrorGeneral", $err[1]." - ".$err[2]]; } + // no break default: return [Exception::class, "engineErrorGeneral", $err[2]]; // @codeCoverageIgnore } + // no break default: return [Exception::class, "engineErrorGeneral", $err[0].": ".$err[2]]; // @codeCoverageIgnore } @@ -39,4 +41,4 @@ trait PDOError { public function getError(): string { return (string) $this->db->errorInfo()[2]; } -} \ No newline at end of file +} diff --git a/lib/Db/SQLite3/Driver.php b/lib/Db/SQLite3/Driver.php index 7c7beea9..5b94bc00 100644 --- a/lib/Db/SQLite3/Driver.php +++ b/lib/Db/SQLite3/Driver.php @@ -82,7 +82,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver { } elseif (PDODriver::requirementsMet()) { return new PDODriver; } else { - throw new Exception("extMissing", self::driverName()); + throw new Exception("extMissing", self::driverName()); } } diff --git a/lib/Db/SQLite3/PDODriver.php b/lib/Db/SQLite3/PDODriver.php index a78dc24a..42e1cf83 100644 --- a/lib/Db/SQLite3/PDODriver.php +++ b/lib/Db/SQLite3/PDODriver.php @@ -35,7 +35,7 @@ class PDODriver extends Driver { } elseif (Driver::requirementsMet()) { return new Driver; } else { - throw new Exception("extMissing", self::driverName()); + throw new Exception("extMissing", self::driverName()); } } diff --git a/tests/cases/Db/SQLite3PDO/TestStatement.php b/tests/cases/Db/SQLite3PDO/TestStatement.php index d9d6b021..5eb6cb9d 100644 --- a/tests/cases/Db/SQLite3PDO/TestStatement.php +++ b/tests/cases/Db/SQLite3PDO/TestStatement.php @@ -14,7 +14,6 @@ use JKingWeb\Arsse\Db\SQLite3\PDODriver; * @covers \JKingWeb\Arsse\Db\PDOStatement * @covers \JKingWeb\Arsse\Db\PDOError */ class TestStatement extends \JKingWeb\Arsse\Test\AbstractTest { - protected $c; protected static $imp = \JKingWeb\Arsse\Db\PDOStatement::class; diff --git a/tests/cases/Lang/TestBasic.php b/tests/cases/Lang/TestBasic.php index fbd71291..351ede8d 100644 --- a/tests/cases/Lang/TestBasic.php +++ b/tests/cases/Lang/TestBasic.php @@ -9,7 +9,6 @@ namespace JKingWeb\Arsse\TestCase\Lang; use JKingWeb\Arsse\Lang as TestClass; use org\bovigo\vfs\vfsStream; - /** @covers \JKingWeb\Arsse\Lang */ class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest { use \JKingWeb\Arsse\Test\Lang\Setup; diff --git a/tests/cases/User/TestAuthorization.php b/tests/cases/User/TestAuthorization.php index 5692f019..088f6748 100644 --- a/tests/cases/User/TestAuthorization.php +++ b/tests/cases/User/TestAuthorization.php @@ -6,7 +6,6 @@ declare(strict_types=1); namespace JKingWeb\Arsse\TestCase\User; - use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Conf; use JKingWeb\Arsse\User; diff --git a/tests/lib/Database/Setup.php b/tests/lib/Database/Setup.php index 42abc756..c9b982f8 100644 --- a/tests/lib/Database/Setup.php +++ b/tests/lib/Database/Setup.php @@ -103,7 +103,7 @@ trait Setup { break; case "bool": $test[$col] = (int) ValueInfo::normalize($value, ValueInfo::T_BOOL | ValueInfo::M_DROP | valueInfo::M_NULL); - break; + break; } } if ($row===$test) {