Issues (8)

src/Container/ConfigProvider.php (2 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Pheature\Crud\Psr11\Toggle\Container;
6
7
use Pheature\Core\Toggle\Read\ChainToggleStrategyFactory;
8
use Pheature\Core\Toggle\Read\FeatureFinder;
9
use Pheature\Core\Toggle\Read\Toggle;
10
use Pheature\Core\Toggle\Write\FeatureRepository;
11
use Pheature\Crud\Psr11\Toggle\ChainToggleStrategyFactoryFactory;
12
use Pheature\Crud\Psr11\Toggle\FeatureFinderFactory;
13
use Pheature\Crud\Psr11\Toggle\FeatureRepositoryFactory;
14
use Pheature\Crud\Psr11\Toggle\ToggleConfigFactory;
15
use Pheature\Crud\Psr11\Toggle\ToggleConfig;
16
use Pheature\Crud\Psr11\Toggle\ToggleFactory;
17
18
/**
19
 * @psalm-type CrudPsr11Config array{dependencies: array{factories: array<string, string>}}
20
 */
21
final class ConfigProvider
22
{
23
    /** @return CrudPsr11Config */
0 ignored issues
show
The type Pheature\Crud\Psr11\Togg...ntainer\CrudPsr11Config was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24 1
    public function __invoke(): array
25
    {
26
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array('dependenci...actoryFactory::class))) returns the type array<string,array<string,array<string,string>>> which is incompatible with the documented return type Pheature\Crud\Psr11\Togg...ntainer\CrudPsr11Config.
Loading history...
27
            'dependencies' => [
28
                'factories' => [
29 1
                    ToggleConfig::class => ToggleConfigFactory::class,
30
                    FeatureFinder::class => FeatureFinderFactory::class,
31
                    Toggle::class => ToggleFactory::class,
32
                    FeatureRepository::class => FeatureRepositoryFactory::class,
33
                    ChainToggleStrategyFactory::class => ChainToggleStrategyFactoryFactory::class,
34
                ],
35
            ],
36
        ];
37
    }
38
}
39