| Conditions | 4 |
| Paths | 8 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 50 | function xmlSerialize(Writer $writer) { |
||
| 51 | $data = [ |
||
| 52 | '{DAV:}dataType' => [$this->dataType => null] |
||
| 53 | ]; |
||
| 54 | if ($this->searchable) { |
||
| 55 | $data['{DAV:}searchable'] = null; |
||
| 56 | } |
||
| 57 | if ($this->sortable) { |
||
| 58 | $data['{DAV:}sortable'] = null; |
||
| 59 | } |
||
| 60 | if ($this->selectable) { |
||
| 61 | $data['{DAV:}selectable'] = null; |
||
| 62 | } |
||
| 63 | $writer->write(array_map(function ($propName) { |
||
| 64 | return [ |
||
| 65 | 'name' => '{DAV:}prop', |
||
| 66 | 'value' => $propName |
||
| 67 | ]; |
||
| 68 | }, $this->properties)); |
||
| 69 | $writer->write($data); |
||
| 70 | } |
||
| 72 |