ComparableForm   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 48
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSourceForm() 0 4 1
A getTargetForm() 0 4 1
1
<?php
2
/**
3
 * @link    https://github.com/nnx-framework/form-comparator
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace Nnx\FormComparator\Context;
7
8
use Zend\Form\FormInterface;
9
10
/**
11
 * Class ComparableForm
12
 *
13
 * @package Nnx\FormComparator\Context
14
 */
15
class ComparableForm
16
{
17
    /**
18
     * Форма которую сравнивают
19
     *
20
     * @var FormInterface
21
     */
22
    private $sourceForm;
23
24
    /**
25
     * Форма с которой сравнивают
26
     *
27
     * @var FormInterface
28
     */
29
    private $targetForm;
30
31
    /**
32
     * ComparableForm constructor.
33
     *
34
     * @param FormInterface $sourceForm
35
     * @param FormInterface $targetForm
36
     */
37
    public function __construct(FormInterface $sourceForm, FormInterface $targetForm)
38
    {
39
        $this->sourceForm = $sourceForm;
40
        $this->targetForm = $targetForm;
41
    }
42
43
    /**
44
     * Возвращает форму которую сравнивают
45
     *
46
     * @return FormInterface
47
     */
48
    public function getSourceForm()
49
    {
50
        return $this->sourceForm;
51
    }
52
53
    /**
54
     * Возвращает форму с которой сравнивают
55
     *
56
     * @return FormInterface
57
     */
58
    public function getTargetForm()
59
    {
60
        return $this->targetForm;
61
    }
62
}
63