Completed
Push — 1.0 ( 7efe55...99ef79 )
by Marc
47:45
created
src/EasyEntityAdapter.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
73 73
     /**
74 74
      * @param $offset
75 75
      */
76
-    public function offsetUnset ($offset)
76
+    public function offsetUnset($offset)
77 77
     {
78 78
         
79 79
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.