Passed
Pull Request — master (#11)
by Pavel
11:58
created

SecurityController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A publicAction() 0 4 1
A privateAction() 0 4 1
1
<?php
2
3
namespace Bankiru\Api\JsonRpc\Test\JsonRpc;
4
5
use Bankiru\Api\Rpc\Routing\Annotation\Method;
6
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
7
8
/**
9
 * @Method("security/")
10
 */
11
final class SecurityController
12
{
13
    /**
14
     * @Method("public")
15
     * @Security("is_granted('IS_AUTHENTICATED_ANONYMOUSLY')")
16
     */
17 1
    public function publicAction()
18
    {
19 1
        return ['success' => true];
20
    }
21
22
    /**
23
     * @Method("private")
24
     * @Security("is_granted('IS_AUTHENTICATED_FULLY')")
25
     */
26
    public function privateAction()
27
    {
28
        return ['success' => true];
29
    }
30
}
31