Completed
Push — master ( 43594b...173d09 )
by Gaetano
07:30
created
WrapperBundle/Core/Traits/RelationTraversingEntity.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Kaliop\eZObjectWrapperBundle\Core\Traits;
4 4
 
5 5
 use Kaliop\eZObjectWrapperBundle\Core\EntityInterface;
6
-
7 6
 use eZ\Publish\Core\FieldType\RelationList;
8 7
 use eZ\Publish\Core\FieldType\Relation;
9 8
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
         $relatedEntities = array();
23 23
 
24 24
         $fieldValue = $this->content()->getFieldValue($fieldName);
25
-        if (! $fieldValue instanceof RelationList\Value) {
25
+        if (!$fieldValue instanceof RelationList\Value) {
26 26
             throw new \RuntimeException("Field '$fieldName' is not of type RelationList");
27 27
         }
28 28
 
29 29
         $relatedContentItems = array();
30
-        foreach($fieldValue->destinationContentIds as $contentId) {
30
+        foreach ($fieldValue->destinationContentIds as $contentId) {
31 31
             // Just in case the object has been pu tin the trash or hidden and they have not updated the related fields to remove from view.
32 32
             try {
33 33
                 $relatedContentItems[] = $this->getContentService()->loadContent($contentId);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     protected function getRelation($fieldName)
50 50
     {
51 51
         $fieldValue = $this->content()->getFieldValue($fieldName);
52
-        if (! $fieldValue instanceof Relation\Value) {
52
+        if (!$fieldValue instanceof Relation\Value) {
53 53
             throw new \RuntimeException("Field '$fieldName' is not of type Relation");
54 54
         }
55 55
 
Please login to merge, or discard this patch.