Skip to content

[Analysis] Result.php: findings deferred to baseline #66

Closed

Description

@tyrsson

Context

Part of #60.

Data

  • unused-property: $numberOfRows is declared but never read or written. Present since the initial laminas-db import (389b937); confirmed via full file history it is not a regression introduced by this PR.
  • missing-constructor: $resource (mysqli|mysqli_result|mysqli_stmt) has no default value and no constructor; it's set via initialize() instead. A nullable-plus-guard rewrite was already shown not to resolve cleanly in Statement.php (Statement.php uninitialized-property findings need local-variable narrowing rewrite #61) due to mago not retaining property null-narrowing across statements; the same limitation applies here.
  • possibly-undefined-int-array-index/mixed-array-assignment in the loadDataFromMysqliStatement() dereference loop (for ($i = 0, $count = count(...); $i < $count; $i++)): mago cannot correlate the loop bound with the size of the parallel keys/values arrays it iterates.

These findings will be captured in a mago baseline rather than fixed or suppressed inline.

Activity

  1. added this to the 0.5.0 milestone on Aug 10, 2026
  2. added theissue type on Aug 10, 2026
  3. tyrsson commented on Oct 7, 2026

    @tyrsson
    MemberAuthor

    Closing as resolved. src/Result.php is captured in the committed analysis-baseline.toml as unused-property (\) and missing-constructor (\), per the disposition recorded in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions