Completed
Push — master ( fe8dc9...ddccce )
by Andrey
02:35
created

UpdateCollection::getDiff()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @link    https://github.com/nnx-framework/form-comparator
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace Nnx\FormComparator\Comparator\Diff;
7
8
use Nnx\FormComparator\Comparator\AbstractDiff;
9
use Zend\Form\Element\Collection;
10
11
/**
12
 * Class UpdateCollection
13
 *
14
 * @package Nnx\FormComparator\Comparator\Diff
15
 */
16
class UpdateCollection extends AbstractDiff
17
{
18
    /**
19
     * Коллекция которую сравнивают
20
     *
21
     * @var Collection
22
     */
23
    private $sourceCollection;
24
25
    /**
26
     * Коллекция с которой сравнивают
27
     *
28
     * @var Collection
29
     */
30
    private $targetCollection;
31
32
    /**
33
     * Расхождение между элементами коллекций
34
     *
35
     * @var AbstractDiff[]
36
     */
37
    private $diff = [];
38
39
//    /**
0 ignored issues
show
Unused Code Comprehensibility introduced by
39% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
40
//     * UpdateElement constructor.
41
//     *
42
//     * @param DiffBuilder $diffBuilder
43
//     */
44
//    public function __construct(DiffBuilder $diffBuilder)
45
//    {
46
//        $this->sourceValue = $diffBuilder->getSourceValue();
47
//        $this->targetValue = $diffBuilder->getTargetValue();
48
//        $this->sourceCollection = $diffBuilder->getSourceElement();
49
//        $this->targetCollection = $diffBuilder->getTargetElement();
50
//
51
//        parent::__construct($diffBuilder);
52
//    }
53
54
    /**
55
     * Коллекция которую сравнивают
56
     *
57
     * @return Collection
58
     */
59
    public function getSourceCollection()
60
    {
61
        return $this->sourceCollection;
62
    }
63
64
    /**
65
     * Коллекция с которой сравнивают
66
     *
67
     * @return Collection
68
     */
69
    public function getTargetCollection()
70
    {
71
        return $this->targetCollection;
72
    }
73
74
    /**
75
     * Расхождение между элементами коллекций
76
     *
77
     * @return \Nnx\FormComparator\Comparator\AbstractDiff[]
78
     */
79
    public function getDiff()
80
    {
81
        return $this->diff;
82
    }
83
84
85
}
86