Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 85 additions & 37 deletions analyzer-baseline.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -1524,12 +1524,6 @@ code = "missing-constant-type"
message = "Class constant `DEFAULT_SCHEMA` is missing a type hint."
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "ambiguous-object-method-access"
message = "Cannot statically verify method call on a generic `object` type."
count = 3

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "imprecise-type"
Expand DownExpand Up@@ -1566,12 +1560,6 @@ code = "invalid-type-cast"
message = "Casting `mixed` to `array`."
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "less-specific-nested-return-statement"
message = '''Returned type `array{}|non-empty-list<mixed>` is less specific than the declared return type `array<array-key, ArrayObject<array-key, mixed>|PhpDb\ResultSet\RowPrototypeInterface|array<array-key, mixed>>` for function `PhpDb\ResultSet\AbstractResultSet::toArray` due to nested 'mixed'.'''
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "missing-api-or-internal"
Expand DownExpand Up@@ -1656,6 +1644,24 @@ code = "property-type-coercion"
message = 'A value of a less specific type `Traversable<mixed, mixed>` is being assigned to property `$dataSource` (Iterator<mixed, mixed>|IteratorAggregate<mixed, mixed>|PhpDb\Adapter\Driver\ResultInterface|null).'
count = 1

[[issues]]
file = "src/ResultSet/ArrayObjectResultSetInterface.php"
code = "missing-api-or-internal"
message = 'Interface `PhpDb\ResultSet\ArrayObjectResultSetInterface` is missing an `@api` or `@internal` annotation.'
count = 1

[[issues]]
file = "src/ResultSet/ArrayResultSet.php"
code = "class-must-be-final"
message = 'Class `PhpDb\ResultSet\ArrayResultSet` should be declared `final`.'
count = 1

[[issues]]
file = "src/ResultSet/ArrayResultSet.php"
code = "imprecise-type"
message = "Type `array` in return type of `toArray` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/ResultSet/Exception/ExceptionInterface.php"
code = "missing-api-or-internal"
Expand All@@ -1682,8 +1688,8 @@ count = 1

[[issues]]
file = "src/ResultSet/HydratingResultSet.php"
code = "less-specific-argument"
message = 'Argument type mismatch for argument #1 of `PhpDb\ResultSet\HydratingResultSet::setRowPrototype`: expected `ArrayObject<array-key, mixed>|PhpDb\ResultSet\RowPrototypeInterface`, but provided type `object` is less specific.'
code = "imprecise-type"
message = "Type `array` in return type of `toArray` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
Expand DownExpand Up@@ -1722,6 +1728,12 @@ code = "possibly-null-argument"
message = 'Argument #1 of method `Laminas\Hydrator\ExtractionInterface::extract` is possibly `null`, but parameter type `object` does not accept it.'
count = 1

[[issues]]
file = "src/ResultSet/HydratingResultSetInterface.php"
code = "missing-api-or-internal"
message = 'Interface `PhpDb\ResultSet\HydratingResultSetInterface` is missing an `@api` or `@internal` annotation.'
count = 1

[[issues]]
file = "src/ResultSet/ResultSet.php"
code = "class-must-be-final"
Expand All@@ -1736,20 +1748,20 @@ count = 1

[[issues]]
file = "src/ResultSet/ResultSet.php"
code = "invalid-return-statement"
message = 'Invalid return type for function `PhpDb\ResultSet\ResultSet::getReturnType`: expected `enum(PhpDb\ResultSet\ResultSetReturnType)`, but found `enum(PhpDb\ResultSet\ResultSetReturnType)|string`.'
code = "imprecise-type"
message = "Type `array` in return type of `toArray` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/ResultSet/ResultSet.php"
code = "invalid-return-statement"
message = 'Invalid return type for function `PhpDb\ResultSet\ResultSet::getRowPrototype`: expected `ArrayObject<array-key, mixed>|PhpDb\ResultSet\RowPrototypeInterface`, but found `ArrayObject<array-key, mixed>|PhpDb\ResultSet\RowPrototypeInterface|null`.'
message = 'Invalid return type for function `PhpDb\ResultSet\ResultSet::getReturnType`: expected `enum(PhpDb\ResultSet\ResultSetReturnType)`, but found `enum(PhpDb\ResultSet\ResultSetReturnType)|string`.'
count = 1

[[issues]]
file = "src/ResultSet/ResultSet.php"
code = "less-specific-return-statement"
message = 'Returned type `array<array-key, mixed>|null|object` is less specific than the declared return type `ArrayObject<array-key, mixed>|PhpDb\ResultSet\RowPrototypeInterface|array<array-key, mixed>|null` for function `PhpDb\ResultSet\ResultSet::current`.'
message = 'Returned type `array<array-key, mixed>|null|object` is less specific than the declared return type `ArrayObject<array-key, mixed>|array<array-key, mixed>|null` for function `PhpDb\ResultSet\ResultSet::current`.'
count = 1

[[issues]]
Expand All@@ -1765,9 +1777,9 @@ message = "Class constant `TYPE_ARRAY` is missing a type hint."
count = 1

[[issues]]
file = "src/ResultSet/ResultSet.php"
code = "nullable-return-statement"
message = 'Function `PhpDb\ResultSet\ResultSet::getRowPrototype` is declared to return `ArrayObject<array-key, mixed>|PhpDb\ResultSet\RowPrototypeInterface` but possibly returns a nullable value (inferred as `ArrayObject<array-key, mixed>|PhpDb\ResultSet\RowPrototypeInterface|null`).'
file = "src/ResultSet/ResultSetInterface.php"
code = "imprecise-type"
message = "Type `array` in return type of `toArray` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
Expand All@@ -1791,25 +1803,49 @@ count = 1
[[issues]]
file = "src/ResultSet/RowPrototypeInterface.php"
code = "imprecise-type"
message = "Type `array` in parameter `$array` is imprecise, equivalent to `array<array-key, mixed>`."
message = "Type `array` in parameter `$data` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeInterface.php"
code = "imprecise-type"
message = "Type `array` in return type of `exchangeArray` is imprecise, equivalent to `array<array-key, mixed>`."
message = "Type `array` in return type of `toArray` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeInterface.php"
code = "missing-api-or-internal"
message = 'Interface `PhpDb\ResultSet\RowPrototypeInterface` is missing an `@api` or `@internal` annotation.'
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeResultSet.php"
code = "class-must-be-final"
message = 'Class `PhpDb\ResultSet\RowPrototypeResultSet` should be declared `final`.'
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeResultSet.php"
code = "imprecise-type"
message = "Type `array` in return type of `current` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeResultSet.php"
code = "imprecise-type"
message = "Type `array` in return type of `toArray` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeInterface.php"
file = "src/ResultSet/RowPrototypeResultSet.php"
code = "less-specific-return-statement"
message = 'Returned type `null|object` is less specific than the declared return type `PhpDb\ResultSet\RowPrototypeInterface|array<array-key, mixed>|null` for function `PhpDb\ResultSet\RowPrototypeResultSet::current`.'
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeResultSetInterface.php"
code = "missing-api-or-internal"
message = 'Interface `PhpDb\ResultSet\RowPrototypeInterface` is missing an `@api` or `@internal` annotation.'
message = 'Interface `PhpDb\ResultSet\RowPrototypeResultSetInterface` is missing an `@api` or `@internal` annotation.'
count = 1

[[issues]]
Expand DownExpand Up@@ -1848,6 +1884,12 @@ code = "imprecise-type"
message = "Type `array` in return type of `toArray` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "incompatible-parameter-name"
message = 'Parameter #1 of `PhpDb\RowGateway\AbstractRowGateway::populate()` is named `$rowData` but parent `PhpDb\ResultSet\RowPrototypeInterface::populate()` names it `$data`'
count = 1

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "incompatible-parameter-type"
Expand DownExpand Up@@ -1890,6 +1932,18 @@ code = "missing-api-or-internal"
message = 'Abstract class `PhpDb\RowGateway\AbstractRowGateway` is missing an `@api` or `@internal` annotation.'
count = 1

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "missing-override-attribute"
message = 'Missing `#[Override]` attribute on overriding method `PhpDb\RowGateway\AbstractRowGateway::populate`.'
count = 1

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "missing-override-attribute"
message = 'Missing `#[Override]` attribute on overriding method `PhpDb\RowGateway\AbstractRowGateway::toArray`.'
count = 1

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "missing-template-parameter"
Expand DownExpand Up@@ -1920,6 +1974,12 @@ code = "mixed-method-access"
message = "Attempting to access a method on a non-object type (`mixed`)."
count = 14

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "mixed-operand"
message = "Invalid middle operand: type `mixed` cannot be reliably used in string concatenation."
count = 1

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "mixed-operand"
Expand DownExpand Up@@ -5010,12 +5070,6 @@ code = "missing-constant-type"
message = "Class constant `TYPE_VALUE` is missing a type hint."
count = 1

[[issues]]
file = "src/Sql/TableIdentifier.php"
code = "class-must-be-final"
message = 'Class `PhpDb\Sql\TableIdentifier` should be declared `final`.'
count = 1

[[issues]]
file = "src/Sql/Update.php"
code = "class-must-be-final"
Expand DownExpand Up@@ -5988,12 +6042,6 @@ code = "class-must-be-final"
message = 'Class `PhpDb\TableGateway\Feature\RowGatewayFeature` should be declared `final`.'
count = 1

[[issues]]
file = "src/TableGateway/Feature/RowGatewayFeature.php"
code = "deprecated-method"
message = 'Call to deprecated method: `PhpDb\ResultSet\ResultSet::setArrayObjectPrototype`.'
count = 3

[[issues]]
file = "src/TableGateway/Feature/RowGatewayFeature.php"
code = "imprecise-type"
Expand Down
Loading
Loading