FormRuleProcessorContext::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 2
1
<?php
2
namespace Boekkooi\Bundle\JqueryValidationBundle\Form;
3
4
use Boekkooi\Bundle\JqueryValidationBundle\Validator\ConstraintCollection;
5
use Symfony\Component\Form\FormInterface;
6
use Symfony\Component\Form\FormView;
7
8
/**
9
 * @author Warnar Boekkooi <[email protected]>
10
 */
11
class FormRuleProcessorContext
12
{
13
    /**
14
     * @var FormView
15
     */
16
    private $view;
17
    /**
18
     * @var FormInterface
19
     */
20
    private $form;
21
    /**
22
     * @var ConstraintCollection
23
     */
24
    private $constraints;
25
26
    public function __construct(FormView $view, FormInterface $form, ConstraintCollection $constraints)
27
    {
28
        $this->view = $view;
29
        $this->form = $form;
30
        $this->constraints = $constraints;
31
    }
32
33
    /**
34
     * @return FormView
35
     */
36
    public function getView()
37
    {
38
        return $this->view;
39
    }
40
41
    /**
42
     * @return FormInterface
43
     */
44
    public function getForm()
45
    {
46
        return $this->form;
47
    }
48
49
    /**
50
     * @return ConstraintCollection
51
     */
52
    public function getConstraints()
53
    {
54
        return $this->constraints;
55
    }
56
}
57