Issues (3627)

app/bundles/ApiBundle/MauticApiBundle.php (1 issue)

1
<?php
2
3
/*
4
 * @copyright   2014 Mautic Contributors. All rights reserved
5
 * @author      Mautic
6
 *
7
 * @link        http://mautic.org
8
 *
9
 * @license     GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
 */
11
12
namespace Mautic\ApiBundle;
13
14
use Mautic\ApiBundle\DependencyInjection\Compiler\OAuthPass;
15
use Mautic\ApiBundle\DependencyInjection\Compiler\SerializerPass;
16
use Mautic\ApiBundle\DependencyInjection\Factory\ApiFactory;
17
use Symfony\Component\DependencyInjection\ContainerBuilder;
18
use Symfony\Component\HttpKernel\Bundle\Bundle;
19
20
/**
21
 * Class MauticApiBundle.
22
 */
23
class MauticApiBundle extends Bundle
24
{
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function build(ContainerBuilder $container)
29
    {
30
        parent::build($container);
31
32
        $container->addCompilerPass(new OAuthPass());
33
        $container->addCompilerPass(new SerializerPass());
34
35
        $extension = $container->getExtension('security');
36
        $extension->addSecurityListenerFactory(new ApiFactory());
0 ignored issues
show
The method addSecurityListenerFactory() does not exist on Symfony\Component\Depend...sion\ExtensionInterface. It seems like you code against a sub-type of Symfony\Component\Depend...sion\ExtensionInterface such as Symfony\Bundle\SecurityB...ction\SecurityExtension. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

36
        $extension->/** @scrutinizer ignore-call */ 
37
                    addSecurityListenerFactory(new ApiFactory());
Loading history...
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getParent()
43
    {
44
        return 'FOSOAuthServerBundle';
45
    }
46
}
47