Completed
Push — master ( 575d8d...afd64c )
by Steevan
04:50
created

UniqueObject::getRequiredOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace steevanb\SymfonyValidatorConstraints\Constraints;
4
5
use Symfony\Component\Validator\Constraint;
6
7
class UniqueObject extends Constraint
8
{
9
    const TYPE_OUT_RANGE = 'OUT_RANGE';
10
11
    /** @var string */
12
    protected $message = 'Non-unique object found.';
13
14
    /** @var array */
15
    protected $properties = [];
16
17
    /** @var array */
18
    protected $getters = [];
19
20
    /** @var bool */
21
    protected $strict = true;
22
23
    /** @var string */
24
    protected $uniqid;
25
26
    /**
27
     * @return string
28
     */
29
    public function validatedBy()
30
    {
31
        return 'steevanb\\SymfonyValidatorConstraints\\Constraints\\UniqueObjectValidator';
32
    }
33
34
    /**
35
     * @return array
36
     */
37
    public function getRequiredOptions()
38
    {
39
        return ['uniqid'];
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getMessage()
46
    {
47
        return $this->message;
48
    }
49
50
    /**
51
     * @return array
52
     */
53
    public function getProperties()
54
    {
55
        return $this->properties;
56
    }
57
58
    /**
59
     * @return array
60
     */
61
    public function getGetters()
62
    {
63
        return $this->getters;
64
    }
65
66
    /**
67
     * @return bool
68
     */
69
    public function getStrict()
70
    {
71
        return $this->strict;
72
    }
73
74
    /**
75
     * @return string
76
     */
77
    public function getUniqid()
78
    {
79
        return $this->uniqid;
80
    }
81
}
82