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 DivineNii opensource projects.
*
* PHP version 7.4 and above required
* @author Divine Niiquaye Ibok <[email protected]>
* @copyright 2021 DivineNii (https://divinenii.com/)
* @license https://opensource.org/licenses/BSD-3-Clause License
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Rade\DI\Loader;
use Rade\DI\ContainerBuilder;
/**
* GlobFileLoader loads files from a glob pattern.
class GlobFileLoader extends FileLoader
{
* {@inheritdoc}
public function load($resource, string $type = null): void
foreach ($this->glob($resource, false, $globResource) as $path => $info) {
$this->import($path);
}
if ($this->container instanceof ContainerBuilder) {
$this->container->addResource($globResource);
addResource()
Rade\DI\AbstractContainer
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->container->/** @scrutinizer ignore-call */
addResource($globResource);
public function supports($resource, string $type = null)
return 'glob' === $type;