mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
CS fixes
This commit is contained in:
parent
a5318d1b12
commit
39cad91b78
9 changed files with 8 additions and 9 deletions
|
@ -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 {
|
||||
|
|
|
@ -44,4 +44,4 @@ trait PDODriver {
|
|||
}
|
||||
return new PDOStatement($this->db, $s, $paramTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ use JKingWeb\Arsse\Db\SQLite3\PDODriver;
|
|||
* @covers \JKingWeb\Arsse\Db\PDOStatement<extended>
|
||||
* @covers \JKingWeb\Arsse\Db\PDOError */
|
||||
class TestStatement extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||
|
||||
protected $c;
|
||||
protected static $imp = \JKingWeb\Arsse\Db\PDOStatement::class;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue