1 | <?php |
||
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 | // /** |
||
|
|||
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() |
||
63 | |||
64 | /** |
||
65 | * Коллекция с которой сравнивают |
||
66 | * |
||
67 | * @return Collection |
||
68 | */ |
||
69 | public function getTargetCollection() |
||
73 | |||
74 | /** |
||
75 | * Расхождение между элементами коллекций |
||
76 | * |
||
77 | * @return \Nnx\FormComparator\Comparator\AbstractDiff[] |
||
78 | */ |
||
79 | public function getDiff() |
||
83 | |||
84 | |||
85 | } |
||
86 |
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.