Passed
Pull Request — development (#682)
by Nick
08:06
created

ImportContext   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFieldNotes() 0 4 1
A getFormData() 0 4 1
1
<?php
2
3
namespace Oc\FieldNotes\Import\Context;
4
5
use Oc\FieldNotes\Form\UploadFormData;
6
use Oc\FieldNotes\Struct\FieldNote;
7
8
/**
9
 * Class ImportContext
10
 *
11
 * @package Oc\FieldNotes\Import\Context
0 ignored issues
show
introduced by
Unexpected tag type @package in doc block
Loading history...
12
 */
13
class ImportContext
14
{
15
    /**
16
     * @var array
17
     */
18
    private $fieldNotes;
19
20
    /**
21
     * @var UploadFormData
0 ignored issues
show
introduced by
UploadFormData => \Oc\FieldNotes\Form\UploadFormData
Loading history...
22
     */
23
    private $formData;
24
25
    /**
26
     * ImportContext constructor.
27
     *
28
     * @param FieldNote[] $fieldNotes
0 ignored issues
show
introduced by
FieldNote[] => \Oc\FieldNotes\Struct\FieldNote[]
Loading history...
29
     * @param UploadFormData $formData
0 ignored issues
show
introduced by
UploadFormData => \Oc\FieldNotes\Form\UploadFormData
Loading history...
30
     */
31
    public function __construct(array $fieldNotes, UploadFormData $formData)
32
    {
33
        $this->fieldNotes = $fieldNotes;
34
        $this->formData = $formData;
35
    }
36
37
    /**
38
     * Returns field notes to be imported.
39
     *
40
     * @return array
41
     */
42
    public function getFieldNotes()
43
    {
44
        return $this->fieldNotes;
45
    }
46
47
    /**
48
     * Returns the UploadFormData.
49
     *
50
     * @return UploadFormData
0 ignored issues
show
introduced by
UploadFormData => \Oc\FieldNotes\Form\UploadFormData
Loading history...
51
     */
52
    public function getFormData()
53
    {
54
        return $this->formData;
55
    }
56
57
58
}
59