Passed
Pull Request — master (#11)
by Pavel
08:05
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
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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