| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 8 | public function init() |
|
| 39 | { |
||
| 40 | 8 | $data = ParamsExpander::expand($this, ['allowDefault', 'allowAny']); |
|
| 41 | 8 | foreach ($data as $name => $value) |
|
| 42 | { |
||
| 43 | 2 | $this->$name = $value; |
|
| 44 | } |
||
| 45 | |||
| 46 | 8 | $i18n = new I18NMeta(); |
|
| 47 | 8 | $i18n->enabled = true; |
|
| 48 | 8 | $i18n->allowDefault = (bool)$this->allowDefault; |
|
| 49 | 8 | $i18n->allowAny = (bool)$this->allowAny; |
|
| 50 | 8 | $this->getEntity()->i18n = $i18n; |
|
| 51 | |||
| 52 | 8 | $this->getEntity()->decorators[] = I18NDecorator::class; |
|
| 53 | 8 | } |
|
| 54 | |||
| 56 |