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

ExtReference   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
ccs 2
cts 2
cp 1
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 2
    public function validatedBy()
34
    {
35 2
        return 'graviton.rest.validator.extref';
36
    }
37
}
38