Context
Coverage-improvement pass on the improve-coverage branch (refs #57). Statement coverage raised to 91.1% (1081/1186). Remaining uncovered statements are unreachable or defensive; captured here rather than force-covered.
Data
Dead code (never executed):
PhpDb\Mysql\Metadata\Source::loadConstraintDataNames() — no caller; not declared in AbstractSource; 55 statements.
PhpDb\Mysql\Pdo\Driver::__construct() addFeatures() branch — Driver never implements DriverFeatureProviderInterface; the $features argument is silently ignored.
PhpDb\Mysql\Driver::checkEnvironment() throw branch — mysqli always loaded.
PhpDb\Mysql\Statement::prepare() InvalidQueryException branch — mysqli->prepare() throws mysqli_sql_exception (PHP 8.1+), never returns non-mysqli_stmt.
PhpDb\Mysql\Statement::execute() failure throw — unreachable for valid prepared statements.
PhpDb\Mysql\Result::next() position++ — dead; position already advanced inside valid()/current().
PhpDb\Mysql\Result::initialize() default => $this->isBuffered arm — no call path produces mysqli_stmt + 0 rows + null isBuffered.
PhpDb\Mysql\Metadata\Source self::DEFAULT_SCHEMA === $schema branches — defaultSchema resolves to the live database name, never the __DEFAULT_SCHEMA__ sentinel.
Defensive branches (need simulated failure to cover):
PhpDb\Mysql\Connection — connect-error, execute-failure, getCurrentSchema error, driver-null, rollback-not-connected.
PhpDb\Mysql\Pdo\Connection — connect-error, getCurrentSchema non-statement/false branches.
PhpDb\Mysql\Result::loadDataFromMysqliStatement() — result_metadata() false / fetch() error branches.
Sql\Ddl decorators — getSqlInsertOffsets() REFERENCES/UNIQUE/PRIMARY branches (column SQL never contains those keywords), no-columns/no-platform throws.
Context
Coverage-improvement pass on the
improve-coveragebranch (refs #57). Statement coverage raised to 91.1% (1081/1186). Remaining uncovered statements are unreachable or defensive; captured here rather than force-covered.Data
Dead code (never executed):
PhpDb\Mysql\Metadata\Source::loadConstraintDataNames()— no caller; not declared inAbstractSource; 55 statements.PhpDb\Mysql\Pdo\Driver::__construct()addFeatures()branch —Drivernever implementsDriverFeatureProviderInterface; the$featuresargument is silently ignored.PhpDb\Mysql\Driver::checkEnvironment()throw branch —mysqlialways loaded.PhpDb\Mysql\Statement::prepare()InvalidQueryExceptionbranch —mysqli->prepare()throwsmysqli_sql_exception(PHP 8.1+), never returns non-mysqli_stmt.PhpDb\Mysql\Statement::execute()failure throw — unreachable for valid prepared statements.PhpDb\Mysql\Result::next()position++— dead; position already advanced insidevalid()/current().PhpDb\Mysql\Result::initialize()default => $this->isBufferedarm — no call path producesmysqli_stmt+ 0 rows + nullisBuffered.PhpDb\Mysql\Metadata\Sourceself::DEFAULT_SCHEMA === $schemabranches —defaultSchemaresolves to the live database name, never the__DEFAULT_SCHEMA__sentinel.Defensive branches (need simulated failure to cover):
PhpDb\Mysql\Connection— connect-error, execute-failure,getCurrentSchemaerror, driver-null, rollback-not-connected.PhpDb\Mysql\Pdo\Connection— connect-error,getCurrentSchemanon-statement/false branches.PhpDb\Mysql\Result::loadDataFromMysqliStatement()—result_metadata()false /fetch()error branches.Sql\Ddldecorators —getSqlInsertOffsets()REFERENCES/UNIQUE/PRIMARYbranches (column SQL never contains those keywords), no-columns/no-platform throws.