AbstractDiff::getPathToElement()   A
last analyzed

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;
7
8
/**
9
 * Class AbstractDiff
10
 *
11
 * @package Nnx\FormComparator\Comparator
12
 */
13
abstract class AbstractDiff
14
{
15
    /**
16
     * Путь до элемента
17
     *
18
     * @var string
19
     */
20
    private $pathToElement;
21
22
    /**
23
     * AbstractDiff constructor.
24
     *
25
     * @param \Nnx\FormComparator\Comparator\DiffElementBuilder $builder
26
     */
27
    public function __construct(DiffElementBuilder $builder)
28
    {
29
        $this->pathToElement = $builder->getPathToElement();
30
31
    }
32
33
    
34
    /**
35
     * Возвращает путь до элемента
36
     *
37
     * @return string
38
     */
39
    public function getPathToElement()
40
    {
41
        return $this->pathToElement;
42
    }
43
44
45
46
}
47