package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -20,7 +20,7 @@ use Psr\Container\ContainerInterface;
*/
class ContainerLoader extends ObjectLoader
{
private $container;
private ContainerInterface $container;
public function __construct(ContainerInterface $container, string $env = null)
{
@@ -28,18 +28,12 @@ class ContainerLoader extends ObjectLoader
parent::__construct($env);
}
/**
* {@inheritdoc}
*/
public function supports($resource, string $type = null)
public function supports(mixed $resource, string $type = null): bool
{
return 'service' === $type && \is_string($resource);
}
/**
* {@inheritdoc}
*/
protected function getObject(string $id)
protected function getObject(string $id): object
{
return $this->container->get($id);
}