Completed
Push — feature/update_all_the_things ( 324e2a...b9ab83 )
by Lucas
30:14 queued 13:01
created

ExtReference   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A validatedBy() 0 4 1
1
<?php
2
/**
3
 * ExtReference class file
4
 */
5
6
namespace Graviton\RestBundle\Validator\Constraints\ExtReference;
7
8
use Symfony\Component\Validator\Constraint;
9
10
/**
11
 * Constraint for the extref type
12
 *
13
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
14
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
15
 * @link     http://swisscom.ch
16
 */
17
class ExtReference extends Constraint
18
{
19
    /**
20
     * @var string
21
     */
22
    public $message = 'Reference to "%collection%" is not allowed.';
23
    /**
24
     * @var array
25
     */
26
    public $collections = [];
27
28
    /**
29
     * Returns the name of the class that validates this constraint.
30
     *
31
     * @return string
32
     */
33
    public function validatedBy()
34
    {
35
        return 'graviton.rest.validator.extref';
36
    }
37
}
38