AllowedCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTargets() 0 4 1
A validatedBy() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the AMFConsoleBundle.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace AMF\ConsoleBundle\Validator\Constraints;
11
12
use Symfony\Component\Validator\Constraint;
13
14
/**
15
 * Contstraint class for url of source.
16
 *
17
 * @author Amine Fattouch <[email protected]>
18
 */
19
class AllowedCommand extends Constraint
20
{
21
    /**
22
     * @var string
23
     */
24
    public $message = 'Cette command n\'est pas autorisée';
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function getTargets()
30
    {
31
        return self::PROPERTY_CONSTRAINT;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function validatedBy()
38
    {
39
        return 'validator.allowed_command';
40
    }
41
}
42