Completed
Push — master ( aa6f89...863f7f )
by John
08:07
created

NoopProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authenticate() 0 4 1
A supports() 0 4 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\SwaggerBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
namespace KleijnWeb\SwaggerBundle\Security;
9
10
use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
11
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
12
13
/**
14
 * Patchwork to make the security extension work
15
 *
16
 * @author John Kleijn <[email protected]>
17
 */
18
class NoopProvider implements AuthenticationProviderInterface
19
{
20
    /**
21
     * {@inheritdoc}
22
     *
23
     * @throws \BadMethodCallException
24
     */
25
    public function authenticate(TokenInterface $token)
26
    {
27
        throw new \BadMethodCallException("Unsupported");
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function supports(TokenInterface $token)
34
    {
35
        return false;
36
    }
37
}
38