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

ReadOnly   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A validatedBy() 0 4 1
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