Test Failed
Pull Request — master (#11)
by Pavel
08:00
created

SecurityController::publicAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
    public function publicAction()
18
    {
19
        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