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

ExtReference::validatedBy()   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
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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