Completed
Push — development ( 4cbc56...9c238f )
by Thomas
27s
created

TranslationStruct::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\Translation;
4
5
class TranslationStruct
6
{
7
    /**
8
     * @var int
9
     */
10
    public $identifier;
11
12
    /**
13
     * @var string
14
     */
15
    public $sourceString;
16
17
    /**
18
     * @var string
19
     */
20
    public $comment;
21
22
    /**
23
     * @var string
24
     */
25
    public $de;
26
27
    /**
28
     * @var string
29
     */
30
    public $fr;
31
32
    /**
33
     * @var string
34
     */
35
    public $nl;
36
37
    /**
38
     * @var string
39
     */
40
    public $es;
41
42
    /**
43
     * @var string
44
     */
45
    public $pl;
46
47
    /**
48
     * @var string
49
     */
50
    public $it;
51
52
    /**
53
     * @var string
54
     */
55
    public $ru;
56
57
    public function fromCsvArray(array $data)
58
    {
59
        $this->identifier = (int) $data['Identifier'];
60
        $this->sourceString = $data['SourceString'];
61
        $this->comment = $data['Comment'];
62
        $this->de = $data['DE'];
63
        $this->fr = $data['FR'];
64
        $this->nl = $data['NL'];
65
        $this->es = $data['ES'];
66
        $this->pl = $data['PL'];
67
        $this->it = $data['IT'];
68
        $this->ru = $data['RU'];
69
70
        return $this;
71
    }
72
73
    public function toArray()
74
    {
75
        return get_object_vars($this);
76
    }
77
}
78