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

ReadOnly::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 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Constraint for read only
4
 */
5
6
namespace Graviton\RestBundle\Validator\Constraints\ReadOnly;
7
8
use Symfony\Component\Validator\Constraint;
9
10
/**
11
 * Constraint for read only
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 ReadOnly extends Constraint
18
{
19
20
    /**
21
     * Error message
22
     *
23
     * @var string
24
     */
25
    public $message = 'The value "%string%" is read only.';
26
27
    /**
28
     * {@inheritdoc}
29
     *
30
     * @return string
31
     */
32
    public function validatedBy()
33
    {
34
        return 'graviton.rest.validator.readonly';
35
    }
36
}
37