| Conditions | 7 |
| Paths | 12 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 18 |
| CRAP Score | 7 |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 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 | 1 | } |
|
| 51 | 1 | } |
|
| 52 | |||
| 53 | 2 | if (isset($translation->mean)) { |
|
| 54 | 2 | foreach ($translation->mean as $meaning) { |
|
| 55 | 2 | $this->meanings[] = new DictionaryBaseItem($meaning); |
|
| 56 | 2 | } |
|
| 57 | 2 | } |
|
| 58 | |||
| 59 | 2 | if (isset($translation->ex)) { |
|
| 60 | 1 | foreach ($translation->ex as $example) { |
|
| 61 | 1 | $this->examples[] = new DictionaryExample($example); |
|
| 62 | 1 | } |
|
| 63 | 1 | } |
|
| 64 | 2 | } |
|
| 65 | |||
| 90 |