Completed
Push — feature/fix-somescrutinizer-is... ( 840c34...8bd6e3 )
by Narcotic
15:02 queued 08:41
created

ExtReference::validatedBy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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 2
    public function validatedBy()
34
    {
35 2
        return 'graviton.rest.validator.extref';
36
    }
37
}
38