| Conditions | 3 |
| Paths | 4 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 3 | public function setData(Common\Dtos\AbstractDto $data): parent |
|
| 13 | { |
||
| 14 | 3 | if (!empty($data->record)) { |
|
| 15 | // process record |
||
| 16 | 3 | $record = new PrintRequest\Record($this->dependenciesFactory); |
|
| 17 | 3 | $record |
|
| 18 | 3 | ->setDirectionalVariable($this->useOneDirectionalVariables) |
|
| 19 | 3 | ->setResolveOptions($this->resolveOptions) |
|
| 20 | 3 | ->setData($data->record); |
|
| 21 | 3 | $data->record = $record; |
|
| 22 | } |
||
| 23 | |||
| 24 | 3 | if (!empty($data->printerSettings)) { |
|
| 25 | // process printer settings |
||
| 26 | 3 | $printerSettings = new PrintRequest\PrinterSettings($this->dependenciesFactory); |
|
| 27 | 3 | $printerSettings |
|
| 28 | 3 | ->setDirectionalVariable($this->useOneDirectionalVariables) |
|
| 29 | 3 | ->setResolveOptions($this->resolveOptions) |
|
| 30 | 3 | ->setData($data->printerSettings); |
|
| 31 | 3 | $data->printerSettings = $printerSettings; |
|
| 32 | } |
||
| 33 | |||
| 34 | 3 | return parent::setData($data); |
|
|
|
|||
| 35 | } |
||
| 58 |