Conditions | 7 |
Paths | 12 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 7 |
Changes | 0 |
1 | <?php |
||
43 | 2 | public function __construct($translation) |
|
44 | { |
||
45 | 2 | parent::__construct($translation); |
|
46 | |||
47 | 2 | if (isset($translation->syn)) { |
|
48 | 1 | foreach ($translation->syn as $synonym) { |
|
49 | 1 | $this->synonyms[] = new DictionaryBaseItem($synonym); |
|
50 | } |
||
51 | } |
||
52 | |||
53 | 2 | if (isset($translation->mean)) { |
|
54 | 2 | foreach ($translation->mean as $meaning) { |
|
55 | 2 | $this->meanings[] = new DictionaryBaseItem($meaning); |
|
56 | } |
||
57 | } |
||
58 | |||
59 | 2 | if (isset($translation->ex)) { |
|
60 | 1 | foreach ($translation->ex as $example) { |
|
61 | 1 | $this->examples[] = new DictionaryExample($example); |
|
62 | } |
||
63 | } |
||
64 | 2 | } |
|
65 | |||
90 |