ConstraintRule::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 5
crap 1
1
<?php
2
namespace Boekkooi\Bundle\JqueryValidationBundle\Form\Rule;
3
4
use Boekkooi\Bundle\JqueryValidationBundle\Form\Rule;
5
use Boekkooi\Bundle\JqueryValidationBundle\Form\RuleMessage;
6
use Symfony\Component\Validator\Constraint;
7
8
/**
9
 * @author Warnar Boekkooi <[email protected]>
10
 */
11
class ConstraintRule extends Rule
12
{
13
    /**
14
     * A list of validation groups
15
     * @var array
16
     */
17
    public $groups;
18
19 2
    public function __construct($name, $options = null, RuleMessage $message = null, array $groups = array(Constraint::DEFAULT_GROUP), array $conditions = array())
20
    {
21 2
        parent::__construct($name, $options, $message, $conditions);
22
23 2
        $this->groups = $groups;
24 2
    }
25
}
26