Passed
Pull Request — master (#9)
by Pavel
12:36
created

SecurityController::privateAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Bankiru\Api\Rpc\Test\Rpc;
4
5
use Bankiru\Api\Rpc\Routing\Annotation\Method;
6
use Bankiru\Api\Rpc\Test\Impl\Response;
7
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
8
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
9
10
/**
11
 * @Method("security/")
12
 */
13
final class SecurityController extends Controller
14
{
15
    /**
16
     * @Method("public")
17
     * @Security("is_granted('IS_AUTHENTICATED_ANONYMOUSLY')")
18
     */
19 1
    public function publicAction()
20
    {
21 1
        return new Response(['success' => true]);
22
    }
23
24
    /**
25
     * @Method("private")
26
     * @Security("is_granted('IS_AUTHENTICATED_FULLY')")
27
     */
28
    public function privateAction()
29
    {
30
        return new Response(['success' => true]);
31
    }
32
}
33