@@ -48,8 +48,7 @@ |
||
| 48 | 48 | } |
| 49 | 49 | if($node !== null) { |
| 50 | 50 | return $this->entityWrapper->wrap($node); |
| 51 | - } |
|
| 52 | - else { |
|
| 51 | + } else { |
|
| 53 | 52 | return null; |
| 54 | 53 | } |
| 55 | 54 | } |
@@ -45,8 +45,7 @@ discard block |
||
| 45 | 45 | $values = $value->getValue(); |
| 46 | 46 | if(isset($values['value'])) { |
| 47 | 47 | $node = $this->entityManager->getStorage('field_collection_item')->load($values['value']); |
| 48 | - } |
|
| 49 | - else { |
|
| 48 | + } else { |
|
| 50 | 49 | /* |
| 51 | 50 | * If there is a default language this is because there is |
| 52 | 51 | * a field collection in another. This remove the language default |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | |
| 66 | 65 | if($node) { |
| 67 | 66 | return $this->entityWrapper->wrap($node); |
| 68 | - } |
|
| 69 | - else { |
|
| 67 | + } else { |
|
| 70 | 68 | return []; |
| 71 | 69 | } |
| 72 | 70 | } |
@@ -75,12 +73,10 @@ discard block |
||
| 75 | 73 | foreach ($toConvert as $k => $v) { |
| 76 | 74 | if(is_array($v) && isset($v[0]) && count($v) == 1) { |
| 77 | 75 | $convert[$k][LanguageInterface::LANGCODE_DEFAULT] = $v[0]; |
| 78 | - } |
|
| 79 | - elseif(count($v) > 1) { |
|
| 76 | + } elseif(count($v) > 1) { |
|
| 80 | 77 | $convert[$k][LanguageInterface::LANGCODE_DEFAULT] = []; |
| 81 | 78 | $this->convertArrayToValues($v, $convert[$k][LanguageInterface::LANGCODE_DEFAULT]); |
| 82 | - } |
|
| 83 | - else { |
|
| 79 | + } else { |
|
| 84 | 80 | $convert[$k] = $v; |
| 85 | 81 | } |
| 86 | 82 | } |