Context::__construct()   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 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
/**
9
 * Class Context
10
 *
11
 * @package Nnx\FormComparator\Context
12
 */
13
class Context
14
{
15
    /**
16
     * Массив объектов, каждый из которых содержит информацию о том какие формы необходимо сравнивать
17
     *
18
     * @var ComparableForm[]
19
     */
20
    private $comparableForm = [];
21
22
    /**
23
     * Context constructor.
24
     *
25
     * @param ContextBuilder $builder
26
     */
27
    public function __construct(ContextBuilder $builder)
28
    {
29
        $this->comparableForm = $builder->getComparableForm();
30
    }
31
32
    /**
33
     * Массив объектов, каждый из которых содержит информацию о том какие формы необходимо сравнивать
34
     *
35
     * @return ComparableForm[]
36
     */
37
    public function getComparableForm()
38
    {
39
        return $this->comparableForm;
40
    }
41
42
43
}
44