Completed
Pull Request — master (#41)
by Sullivan
05:13
created

Activity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Nexy\PayboxDirect\Constraints;
4
5
use Symfony\Component\Validator\Constraints\Choice;
6
use Symfony\Component\Validator\Constraints\ChoiceValidator;
7
8
/**
9
 * @Annotation
10
 * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
11
 *
12
 * @author Sullivan Senechal <[email protected]>
13
 */
14
final class Activity extends Choice
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function __construct($options)
20
    {
21
        parent::__construct($options);
22
23
        $this->choices = \Nexy\PayboxDirect\Enum\Activity::getConstants();
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function validatedBy()
30
    {
31
        return ChoiceValidator::class;
32
    }
33
}
34