Valid   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
c 0
b 0
f 0
dl 0
loc 59
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTargets() 0 3 1
1
<?php
2
3
namespace App\Validator\Constraints\Role\Permissions;
4
5
use Symfony\Component\Validator\Constraint;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Validator\Constraint was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
/**
8
 * Class Valid
9
 *
10
 * @Annotation
11
 */
12
final class Valid extends Constraint
13
{
14
    /**
15
     * @var string
16
     */
17
    public $serviceUndefined = 'Permissions object contains undefined service {{ service }}.';
18
19
    /**
20
     * @var string
21
     */
22
    public $permissionsNotArray = '{{ service }} permissions should be an array.';
23
24
    /**
25
     * @var string
26
     */
27
    public $permissionNotObject = '{{ service }} permission should be an object.';
28
29
    /**
30
     * @var string
31
     */
32
    public $permissionAttributeMissing = '{{ service }} permission object is missing attribute {{ attribute }}.';
33
34
    /**
35
     * @var string
36
     */
37
    public $subscopeNotArray = '{{ service }} subscope should be an array.';
38
39
    /**
40
     * @var string
41
     */
42
    public $subscopeAttributeMissing = '{{ service }} subscope object is missing attribute {{ attribute }}.';
43
44
    /**
45
     * @var string
46
     */
47
    public $subpermissionsNotArray = '{{ service }} subpermissions should be an array.';
48
49
    /**
50
     * @var string
51
     */
52
    public $subpermissionNotObject = '{{ service }} subpermission should be an object.';
53
54
    /**
55
     * @var string
56
     */
57
    public $subpermissionAttributeMissing = '{{ service }} subpermission object is missing attribute {{ attribute }}.';
58
59
    /**
60
     * @var string
61
     */
62
    public $subpermissionUndefined = '{{ service }} subpermission object contains undefined attribute {{ attribute }}.';
63
64
65
    /**
66
     * {@inheritdoc}
67
     */
68
    public function getTargets()
69
    {
70
        return self::CLASS_CONSTRAINT;
71
    }
72
}
73