Skip to content
Open
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
222 changes: 0 additions & 222 deletions analyzer-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,216 +126,18 @@ code = "missing-property-type"
message = "Property `$profiles` is missing a type hint."
count = 1

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

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

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "imprecise-type"
message = "Type `array` in parameter `$options` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "imprecise-type"
message = "Type `array` in property `$config` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

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

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "incompatible-parameter-type"
message = 'Parameter `$container` of `PhpDb\Container\AbstractAdapterInterfaceFactory::__invoke()` expects type `Psr\Container\ContainerInterface&Laminas\ServiceManager\ServiceManager` but parent `Laminas\ServiceManager\Factory\FactoryInterface::__invoke()` expects type `Psr\Container\ContainerInterface`'
count = 1

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

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "mixed-argument"
message = 'Invalid argument type for argument #2 of `Laminas\ServiceManager\ServiceManager::build`: expected `array<array-key, mixed>|null`, but found `mixed`.'
count = 1

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

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "mixed-property-type-coercion"
message = "A value with a less specific type `nonnull` is being assigned to property `$config` (array<array-key, mixed>|null)."
count = 1

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

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "possibly-null-argument"
message = 'Argument #3 of method `PhpDb\Adapter\Adapter::__construct` is possibly `null`, but parameter type `PhpDb\ResultSet\ResultSetInterface<mixed>` does not accept it.'
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "possibly-null-array-access"
message = "Cannot perform array access on possibly `null` value."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "possibly-undefined-string-array-index"
message = "Possibly undefined array key `string` accessed on `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "redundant-docblock-type"
message = "Redundant docblock type for variable `$driver`."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "redundant-docblock-type"
message = "Redundant docblock type for variable `$platform`."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "redundant-docblock-type"
message = "Redundant docblock type for variable `$profiler`."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "unhandled-thrown-type"
message = 'Potentially unhandled exception `Psr\Container\ContainerExceptionInterface` in `PhpDb\Container\AbstractAdapterInterfaceFactory::getConfig`.'
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "unhandled-thrown-type"
message = 'Potentially unhandled exception `Psr\Container\NotFoundExceptionInterface` in `PhpDb\Container\AbstractAdapterInterfaceFactory::getConfig`.'
count = 1

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

[[issues]]
file = "src/Container/AdapterInterfaceDelegator.php"
code = "imprecise-type"
message = "Type `array` in parameter `$options` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceDelegator.php"
code = "imprecise-type"
message = "Type `array` in parameter `$state` is imprecise, equivalent to `array<array-key, mixed>`."
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceDelegator.php"
code = "mixed-argument"
message = 'Invalid argument type for argument #1 of `PhpDb\Container\AdapterInterfaceDelegator::__construct`: expected `string`, but found `nonnull`.'
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceDelegator.php"
code = "mixed-assignment"
message = "Assigning `mixed` type to a variable may lead to unexpected behavior."
count = 2

[[issues]]
file = "src/Container/AdapterInterfaceDelegator.php"
code = "unused-parameter"
message = "Parameter `$options` is never used."
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "mixed-argument"
message = 'Invalid argument type for argument #2 of `Laminas\ServiceManager\ServiceManager::build`: expected `array<array-key, mixed>|null`, but found `nonnull`.'
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "mixed-assignment"
message = "Assigning `nonnull` type to a variable may lead to unexpected behavior."
count = 2

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "possibly-null-argument"
message = 'Argument #1 of method `Laminas\ServiceManager\ServiceManager::build` is possibly `null`, but parameter type `class-string<PhpDb\Adapter\Driver\DriverInterface>|class-string<PhpDb\Adapter\Driver\PdoDriverInterface>|string` does not accept it.'
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "possibly-null-argument"
message = 'Argument #3 of method `PhpDb\Adapter\Adapter::__construct` is possibly `null`, but parameter type `PhpDb\ResultSet\ResultSetInterface<mixed>` does not accept it.'
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "redundant-docblock-type"
message = "Redundant docblock type for variable `$adapterPlatform`."
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "redundant-docblock-type"
message = "Redundant docblock type for variable `$profilerInterface`."
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "unhandled-thrown-type"
message = 'Potentially unhandled exception `Laminas\ServiceManager\Exception\ServiceNotCreatedException` in `PhpDb\Container\AdapterInterfaceFactory::__invoke`.'
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "unhandled-thrown-type"
message = 'Potentially unhandled exception `PhpDb\Exception\ContainerException` in `PhpDb\Container\AdapterInterfaceFactory::__invoke`.'
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "unhandled-thrown-type"
message = 'Potentially unhandled exception `Psr\Container\ContainerExceptionInterface` in `PhpDb\Container\AdapterInterfaceFactory::__invoke`.'
count = 1

[[issues]]
file = "src/Container/AdapterInterfaceFactory.php"
code = "unhandled-thrown-type"
message = 'Potentially unhandled exception `Psr\Container\NotFoundExceptionInterface` in `PhpDb\Container\AdapterInterfaceFactory::__invoke`.'
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "incompatible-return-type"
Expand All @@ -348,12 +150,6 @@ code = "invalid-type-cast"
message = "Casting `mixed` to `array`."
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "mixed-assignment"
message = "Assigning `mixed` type to a variable may lead to unexpected behavior."
count = 2

[[issues]]
file = "src/ResultSet/Exception/InvalidArgumentException.php"
code = "class-must-be-final"
Expand All @@ -366,24 +162,6 @@ code = "class-must-be-final"
message = 'Class `PhpDb\ResultSet\Exception\RuntimeException` should be declared `final`.'
count = 1

[[issues]]
file = "src/ResultSet/HydratingResultSet.php"
code = "redundant-docblock-type"
message = "Redundant docblock type for variable `$row`."
count = 1

[[issues]]
file = "src/ResultSet/ObjectResultSet.php"
code = "redundant-docblock-type"
message = "Redundant docblock type for variable `$row`."
count = 1

[[issues]]
file = "src/ResultSet/RowPrototypeResultSet.php"
code = "redundant-condition"
message = "Redundant ternary operator: condition is always truthy."
count = 1

[[issues]]
file = "src/RowGateway/AbstractRowGateway.php"
code = "imprecise-type"
Expand Down
12 changes: 0 additions & 12 deletions lint-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ code = "cyclomatic-complexity"
message = "Class has high complexity."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "no-empty"
message = "Use of the `empty` construct."
count = 1

[[issues]]
file = "src/Container/AbstractAdapterInterfaceFactory.php"
code = "no-isset"
message = "Use of the `isset` construct."
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "cyclomatic-complexity"
Expand Down
14 changes: 14 additions & 0 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
{
public const string NAMED_ADAPTER_KEY = 'adapters';

/**
* @return array{
* abstract_factories: list<class-string>,
* aliases: array<class-string, class-string>,
* factories: array<class-string, class-string>,
* }
*/
public function getDependencies(): array
{
return [
Expand All @@ -24,6 +31,13 @@ public function getDependencies(): array
];
}

/**
* @return array{dependencies: array{
* abstract_factories: list<class-string>,
* aliases: array<class-string, class-string>,
* factories: array<class-string, class-string>,
* }}
*/
public function __invoke(): array
{
return [
Expand Down
Loading
Loading