Completed
Push — master ( caeb59...e7b0db )
by Axel
05:20
created

FooController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 37
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A second() 0 3 1
A first() 0 3 1
A fourth() 0 3 1
A third() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Zikula package.
7
 *
8
 * Copyright Zikula - https://ziku.la/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zikula\PermissionsModule\Tests\Api\Fixtures;
15
16
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
17
use Zikula\PermissionsModule\Annotation\PermissionCheck;
18
19
class FooController extends AbstractController
20
{
21
    /**
22
     * @PermissionCheck("admin")
23
     */
24
    public function first()
25
    {
26
        return true;
27
    }
28
29
    /**
30
     * @PermissionCheck({"AcmeFooModule::", ".*", "overview"})
31
     */
32
    public function second()
33
    {
34
        return true;
35
    }
36
37
    /**
38
     * @PermissionCheck({"$_zkModule", "::$gid", "ACCESS_EDIT"})
39
     */
40
    public function third()
41
    {
42
        return true;
43
    }
44
45
    /**
46
     * @PermissionCheck("admin")
47
     * @PermissionCheck("edit")
48
     * @PermissionCheck("delete")
49
     * @PermissionCheck("moderate")
50
     * @PermissionCheck("comment")
51
     * @PermissionCheck("overview")
52
     */
53
    public function fourth()
54
    {
55
        return true;
56
    }
57
}
58