Failed Conditions
Pull Request — master (#21)
by Yo
03:03
created

JsonRpcParamsSfConstraintsDocExtension.php (1 issue)

Labels
Severity
1
<?php
2
namespace Yoanm\SymfonyJsonRpcParamsSfConstraintsDoc\DependencyInjection;
3
4
use Symfony\Component\Config\FileLocator;
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
1 ignored issue
show
The type Symfony\Component\Depend...ection\ContainerBuilder 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...
6
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
7
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
8
9
/**
10
 * Class JsonRpcParamsSfConstraintsDocExtension
11
 */
12
class JsonRpcParamsSfConstraintsDocExtension implements ExtensionInterface
13
{
14
    // Extension identifier (used in configuration for instance)
15
    const EXTENSION_IDENTIFIER = 'json_rpc_params_sf_constraints_doc';
16
17
    /**
18
     * {@inheritdoc}
19
     */
20 2
    public function load(array $configs, ContainerBuilder $container)
21
    {
22 2
        $loader = new YamlFileLoader(
23 2
            $container,
24 2
            new FileLocator(__DIR__.'/../Resources/config')
25 2
        );
26 2
        $loader->load('services.sdk.app.yaml');
27 2
        $loader->load('services.sdk.infra.yaml');
28 2
        $loader->load('services.public.yaml');
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34 3
    public function getNamespace()
35
    {
36 3
        return 'http://example.org/schema/dic/'.$this->getAlias();
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42 1
    public function getXsdValidationBasePath()
43
    {
44 1
        return '';
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50 3
    public function getAlias()
51
    {
52 3
        return self::EXTENSION_IDENTIFIER;
53
    }
54
}
55