@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | /** |
| 39 | 39 | * @param $offset |
| 40 | 40 | */ |
| 41 | - public function offsetExists ($offset) |
|
| 41 | + public function offsetExists($offset) |
|
| 42 | 42 | { |
| 43 | 43 | return isset($this->entity->$offset); |
| 44 | 44 | } |
@@ -46,12 +46,12 @@ discard block |
||
| 46 | 46 | /** |
| 47 | 47 | * @param $offset |
| 48 | 48 | */ |
| 49 | - public function offsetGet ($offset) |
|
| 49 | + public function offsetGet($offset) |
|
| 50 | 50 | { |
| 51 | - if(isset($this->entity->$offset)) { |
|
| 51 | + if (isset($this->entity->$offset)) { |
|
| 52 | 52 | $values = $this->entity->$offset; |
| 53 | 53 | $cardinality = $values->getDataDefinition()->getFieldStorageDefinition()->getCardinality(); |
| 54 | - if(1 === $cardinality) { |
|
| 54 | + if (1 === $cardinality) { |
|
| 55 | 55 | return $this->entityWrapper->convert($values[0]); |
| 56 | 56 | } |
| 57 | 57 | else { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @param $offset |
| 66 | 66 | * @param $value |
| 67 | 67 | */ |
| 68 | - public function offsetSet ($offset, $value) |
|
| 68 | + public function offsetSet($offset, $value) |
|
| 69 | 69 | { |
| 70 | 70 | |
| 71 | 71 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * @param $offset |
| 75 | 75 | */ |
| 76 | - public function offsetUnset ($offset) |
|
| 76 | + public function offsetUnset($offset) |
|
| 77 | 77 | { |
| 78 | 78 | |
| 79 | 79 | } |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | $cardinality = $values->getDataDefinition()->getFieldStorageDefinition()->getCardinality(); |
| 54 | 54 | if(1 === $cardinality) { |
| 55 | 55 | return $this->entityWrapper->convert($values[0]); |
| 56 | - } |
|
| 57 | - else { |
|
| 56 | + } else { |
|
| 58 | 57 | return array_map([$this->entityWrapper, 'convert'], iterator_to_array($values)); |
| 59 | 58 | } |
| 60 | 59 | } |