| Conditions | 5 |
| Paths | 3 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function hashToFieldValue($fieldValue, array $context = array()) |
||
| 22 | { |
||
| 23 | $authors = array(); |
||
| 24 | |||
| 25 | /// @deprecated |
||
| 26 | if (isset($fieldValue['authors'])) { |
||
| 27 | foreach ($fieldValue['authors'] as $author) { |
||
| 28 | $authors[] = new Author($author); |
||
| 29 | } |
||
| 30 | } else if (is_array($fieldValue)) { |
||
| 31 | /// same as what fromHash() does, really |
||
| 32 | foreach ($fieldValue as $author) { |
||
| 33 | $authors[] = new Author($author); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | return new AuthorValue($authors); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |