Context   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getComparableForm() 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
/**
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