for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of forecast.it.fill project.
* (c) Patrick Jaja <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace ForecastAutomation\Kernel;
use Psr\Container\ContainerInterface;
class AbstractDependencyProvider implements ContainerInterface
{
protected static array $instances;
protected Locator $locator;
public function __construct()
$this->provideDependencies(new Locator($this));
}
//ToDo: Pass Container (DI) with module dynamic resolver of KernelConfig Patterns
public function provideDependencies(Locator $locator): void
$locator
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function provideDependencies(/** @scrutinizer ignore-unused */ Locator $locator): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
public function get(string $id)
return static::$instances[$id];
public function has(string $id): bool
// TODO: Implement has() method.
return true;
public function set(string $id, $concrete): void
static::$instances[$id] = $concrete;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.