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
199 changes: 66 additions & 133 deletions analyzer-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ count = 1
[[issues]]
file = "src/Adapter/Profiler/Profiler.php"
code = "invalid-property-assignment-value"
message = '''Invalid type for property `$profiles`: expected `array<array-key, array{'elapse': float|null, 'end': float|null, 'parameters': PhpDb\Adapter\ParameterContainer|null, 'sql': string, 'start': float}>`, but got `array<array-key, array{'elapse': float|null, 'end': float|null, 'parameters': PhpDb\Adapter\ParameterContainer|null, 'sql': null|string, 'start': float}>`.'''
message = '''Invalid type for property `$profiles`: expected `array<array-key, array{'elapse': float|null, 'end': float|null, 'parameters': PhpDb\Adapter\ParameterContainer|null, 'sql': string, 'start': float}>`, but got `non-empty-array<array-key, array{'elapse': float|null, 'end': float|null, 'parameters': PhpDb\Adapter\ParameterContainer|null, 'sql': null|string, 'start': float}>`.'''
count = 1

[[issues]]
Expand All @@ -1194,24 +1194,6 @@ code = "missing-property-type"
message = "Property `$profiles` is missing a type hint."
count = 1

[[issues]]
file = "src/Adapter/Profiler/Profiler.php"
code = "possibly-null-operand"
message = "Right operand in arithmetic operation might be `null` (type `float|null`)."
count = 1

[[issues]]
file = "src/Adapter/Profiler/Profiler.php"
code = "possibly-undefined-int-array-index"
message = '''Possibly undefined array key `int` accessed on `array<array-key, array{'elapse': float|null, 'end': float|null, 'parameters': PhpDb\Adapter\ParameterContainer|null, 'sql': string, 'start': float}>`.'''
count = 1

[[issues]]
file = "src/Adapter/Profiler/Profiler.php"
code = "possibly-undefined-string-array-index"
message = '''Possibly undefined array key accessed on `array{'elapse': float|null, 'end': float, 'parameters': PhpDb\Adapter\ParameterContainer|null, 'sql': string, 'start': float}|array{'end': float}`.'''
count = 1

[[issues]]
file = "src/Adapter/Profiler/Profiler.php"
code = "unhandled-thrown-type"
Expand Down Expand Up @@ -2076,6 +2058,12 @@ code = "class-must-be-final"
message = 'Class `PhpDb\RowGateway\Exception\RuntimeException` should be declared `final`.'
count = 1

[[issues]]
file = "src/RowGateway/Feature/FeatureSet.php"
code = "unused-property"
message = "Property `$magicSpecifications` is never used."
count = 1

[[issues]]
file = "src/RowGateway/RowGateway.php"
code = "class-must-be-final"
Expand Down Expand Up @@ -2142,12 +2130,6 @@ code = "invalid-iterator"
message = "The expression provided to `foreach` is not iterable. It resolved to type `mixed`, which is not iterable."
count = 1

[[issues]]
file = "src/Sql/AbstractSql.php"
code = "invalid-member-selector"
message = "Invalid type `array-key` used as a member selector; a string is expected."
count = 1

[[issues]]
file = "src/Sql/AbstractSql.php"
code = "invalid-operand"
Expand Down Expand Up @@ -2187,7 +2169,7 @@ count = 1
[[issues]]
file = "src/Sql/AbstractSql.php"
code = "less-specific-nested-argument-type"
message = "Argument type mismatch for argument #2 of `vsprintf`: expected `array<array-key, Stringable|null|scalar>`, but provided type `array{}|non-empty-list<mixed>` is less specific."
message = "Argument type mismatch for argument #2 of `vsprintf`: expected `array<array-key, Stringable|null|scalar>`, but provided type `list<mixed>` is less specific."
count = 1

[[issues]]
Expand Down Expand Up @@ -2376,6 +2358,12 @@ code = "string-member-selector"
message = "This member selector uses a non-literal string type (`non-empty-string`); its specific value cannot be statically determined."
count = 1

[[issues]]
file = "src/Sql/AbstractSql.php"
code = "string-member-selector"
message = "This member selector uses a non-literal string type (`string`); its specific value cannot be statically determined."
count = 1

[[issues]]
file = "src/Sql/AbstractSql.php"
code = "unhandled-thrown-type"
Expand Down Expand Up @@ -3219,7 +3207,13 @@ count = 1
[[issues]]
file = "src/Sql/Ddl/CreateTable.php"
code = "possibly-undefined-string-array-index"
message = "Possibly undefined array key `string('combinedBy')` accessed on `array<array-key, array<array-key, mixed>|string>`."
message = "Possibly undefined array key `string('combinedBy')` accessed on `array<array-key, array<array-key, mixed>>`."
count = 1

[[issues]]
file = "src/Sql/Ddl/CreateTable.php"
code = "possibly-undefined-string-array-index"
message = "Possibly undefined array key `string('combinedBy')` accessed on `array<array-key, string>`."
count = 1

[[issues]]
Expand Down Expand Up @@ -3900,12 +3894,6 @@ code = "class-must-be-final"
message = 'Class `PhpDb\Sql\Platform\Platform` should be declared `final`.'
count = 1

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

[[issues]]
file = "src/Sql/Platform/Platform.php"
code = "invalid-iterator"
Expand Down Expand Up @@ -4251,7 +4239,7 @@ count = 1
[[issues]]
file = "src/Sql/Predicate/PredicateSet.php"
code = "less-specific-nested-argument-type"
message = "Argument type mismatch for argument #2 of `implode`: expected `array<array-key, Stringable|null|scalar>|null`, but provided type `array{}|non-empty-list<mixed>` is less specific."
message = "Argument type mismatch for argument #2 of `implode`: expected `array<array-key, Stringable|null|scalar>|null`, but provided type `list<mixed>` is less specific."
count = 1

[[issues]]
Expand All @@ -4263,7 +4251,7 @@ count = 1
[[issues]]
file = "src/Sql/Predicate/PredicateSet.php"
code = "less-specific-nested-return-statement"
message = '''Returned type `array{'spec': string, 'values': array{}|list<mixed>}` is less specific than the declared return type `array{'spec': string, 'values': array<array-key, PhpDb\Sql\ArgumentInterface>}` for function `PhpDb\Sql\Predicate\PredicateSet::getExpressionData` due to nested 'mixed'.'''
message = '''Returned type `array{'spec': string, 'values': list<mixed>}` is less specific than the declared return type `array{'spec': string, 'values': array<array-key, PhpDb\Sql\ArgumentInterface>}` for function `PhpDb\Sql\Predicate\PredicateSet::getExpressionData` due to nested 'mixed'.'''
count = 1

[[issues]]
Expand Down Expand Up @@ -4518,12 +4506,6 @@ code = "invalid-property-assignment-value"
message = 'Invalid type for property `$joins`: expected `PhpDb\Sql\Join`, but got `null`.'
count = 1

[[issues]]
file = "src/Sql/Select.php"
code = "invalid-property-assignment-value"
message = "Invalid type for property `$specifications`: expected `array<array-key, array<array-key, mixed>>|array<array-key, string>`, but got `array<array-key, array<array-key, mixed>|string>`."
count = 1

[[issues]]
file = "src/Sql/Select.php"
code = "invalid-property-assignment-value"
Expand Down Expand Up @@ -5218,36 +5200,6 @@ count = 1
file = "src/TableGateway/AbstractTableGateway.php"
code = "impossible-condition"
message = "This condition (type `false`) will always evaluate to false."
count = 7

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "impossible-type-comparison"
message = "Impossible type assertion: `$deleteState['table']` of type `string` can never be `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "impossible-type-comparison"
message = "Impossible type assertion: `$insertState['table']` of type `string` can never be `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "impossible-type-comparison"
message = "Impossible type assertion: `$this->table` of type `string` can never be `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "impossible-type-comparison"
message = "Impossible type assertion: `$this->table` of type `string` can never be `object`."
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "impossible-type-comparison"
message = "Impossible type assertion: `$updateState['table']` of type `string` can never be `array<array-key, mixed>`."
count = 1

[[issues]]
Expand Down Expand Up @@ -5294,9 +5246,9 @@ count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "invalid-clone"
message = "Invalid `clone` operation on non-cloneable type `never`."
count = 1
code = "invalid-array-access"
message = 'Cannot access array index on object `PhpDb\Sql\TableIdentifier` that does not implement `ArrayAccess`.'
count = 3

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
Expand Down Expand Up @@ -5328,6 +5280,12 @@ code = "invalid-return-statement"
message = 'Invalid return type for function `PhpDb\TableGateway\AbstractTableGateway::getSql`: expected `PhpDb\Sql\Sql`, but found `PhpDb\Sql\Sql|null`.'
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "invalid-return-statement"
message = 'Invalid return type for function `PhpDb\TableGateway\AbstractTableGateway::getTable`: expected `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|string`, but found `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|null|string`.'
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "missing-api-or-internal"
Expand Down Expand Up @@ -5430,24 +5388,6 @@ code = "mixed-return-statement"
message = 'Could not infer a precise return type for function `PhpDb\TableGateway\AbstractTableGateway::executeUpdate`. Saw type `mixed`.'
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "no-value"
message = "Argument #1 passed to function `array_values` has type `never`, meaning it cannot produce a value."
count = 3

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "no-value"
message = "Argument #1 passed to function `count` has type `never`, meaning it cannot produce a value."
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "no-value"
message = "Argument #1 passed to function `reset` has type `never`, meaning it cannot produce a value."
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "nullable-return-statement"
Expand All @@ -5472,6 +5412,12 @@ code = "nullable-return-statement"
message = 'Function `PhpDb\TableGateway\AbstractTableGateway::getSql` is declared to return `PhpDb\Sql\Sql` but possibly returns a nullable value (inferred as `PhpDb\Sql\Sql|null`).'
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "nullable-return-statement"
message = 'Function `PhpDb\TableGateway\AbstractTableGateway::getTable` is declared to return `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|string` but possibly returns a nullable value (inferred as `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|null|string`).'
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "overly-wide-return-type"
Expand All @@ -5498,15 +5444,15 @@ count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "redundant-comparison"
message = "Redundant `===` comparison: left-hand side is never identical to right-hand side."
count = 2
code = "possibly-undefined-string-array-index"
message = "Possibly undefined array key `string('table')` accessed on `array<array-key, mixed>`."
count = 3

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "redundant-logical-operation"
message = "Redundant `&&` operation: left operand is always falsy and right operand is not evaluated."
count = 2
code = "redundant-comparison"
message = "Redundant `===` comparison: left-hand side is never identical to right-hand side."
count = 1

[[issues]]
file = "src/TableGateway/Exception/ExceptionInterface.php"
Expand All @@ -5527,27 +5473,39 @@ message = 'Class `PhpDb\TableGateway\Exception\RuntimeException` should be decla
count = 1

[[issues]]
file = "src/TableGateway/TableGateway.php"
code = "class-must-be-final"
message = 'Class `PhpDb\TableGateway\TableGateway` should be declared `final`.'
file = "src/TableGateway/Feature/MetadataFeature.php"
code = "mixed-assignment"
message = "Assigning `mixed` type to a variable may lead to unexpected behavior."
count = 1

[[issues]]
file = "src/TableGateway/TableGateway.php"
code = "imprecise-type"
message = "Type `array` in parameter `$features` is imprecise, equivalent to `array<array-key, mixed>`."
file = "src/TableGateway/Feature/MetadataFeature.php"
code = "mixed-assignment"
message = "Assigning `nonnull` type to a variable may lead to unexpected behavior."
count = 1

[[issues]]
file = "src/TableGateway/Feature/RowGatewayFeature.php"
code = "mixed-assignment"
message = "Assigning `mixed` type to a variable may lead to unexpected behavior."
count = 1

[[issues]]
file = "src/TableGateway/Feature/SequenceFeature.php"
code = "mixed-assignment"
message = "Assigning `mixed` type to a variable may lead to unexpected behavior."
count = 1

[[issues]]
file = "src/TableGateway/TableGateway.php"
code = "imprecise-type"
message = "Type `array` in parameter `$table` is imprecise, equivalent to `array<array-key, mixed>`."
code = "class-must-be-final"
message = 'Class `PhpDb\TableGateway\TableGateway` should be declared `final`.'
count = 1

[[issues]]
file = "src/TableGateway/TableGateway.php"
code = "invalid-property-assignment-value"
message = 'Invalid type for property `$table`: expected `string`, but got `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|string`.'
code = "imprecise-type"
message = "Type `array` in parameter `$table` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
Expand All @@ -5567,28 +5525,3 @@ file = "src/TableGateway/TableGatewayInterface.php"
code = "missing-api-or-internal"
message = 'Interface `PhpDb\TableGateway\TableGatewayInterface` is missing an `@api` or `@internal` annotation.'
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "nullable-return-statement"
message = 'Function `PhpDb\TableGateway\AbstractTableGateway::getTable` is declared to return `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|string` but possibly returns a nullable value (inferred as `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|null|string`).'
count = 1

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "invalid-return-statement"
message = 'Invalid return type for function `PhpDb\TableGateway\AbstractTableGateway::getTable`: expected `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|string`, but found `PhpDb\Sql\TableIdentifier|array<array-key, mixed>|null|string`.'
count = 1


[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "invalid-array-access"
message = 'Cannot access array index on object `PhpDb\Sql\TableIdentifier` that does not implement `ArrayAccess`.'
count = 3

[[issues]]
file = "src/TableGateway/AbstractTableGateway.php"
code = "possibly-undefined-string-array-index"
message = "Possibly undefined array key `string('table')` accessed on `array<array-key, mixed>`."
count = 3
Loading
Loading