Completed
Push — master ( 4ca75b...767210 )
by Jelle
05:24
created
src/Entity/EntityPropertyUtil.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
     $return = $val;
19 19
     if (method_exists($val, 'raw')) {
20 20
       $return = $val->raw();
21
-    }
22
-    elseif (is_array($val)) {
21
+    } elseif (is_array($val)) {
23 22
       $return = array();
24 23
       foreach ($val as $v) {
25 24
         $return[] = method_exists($v, 'raw') ? $v->raw() : $v;
Please login to merge, or discard this patch.
src/Entity/EntityInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -25,6 +25,7 @@
 block discarded – undo
25 25
    *
26 26
    * @param \TheSportsDb\Entity\LeagueInterface $league
27 27
    *   The league to add.
28
+   * @return void
28 29
    */
29 30
   public function addLeague(LeagueInterface $league);
30 31
 }
Please login to merge, or discard this patch.
src/Entity/Entity.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
    * @param array $contextPropertyMap
163 163
    *   Extra properties to map from the context
164 164
    *
165
-   * @return array
165
+   * @return string
166 166
    *   An array with following keys:
167 167
    *     - object: The raw data representing the entity.
168 168
    *     - id: The id of the entity.
Please login to merge, or discard this patch.
src/Entity/EntityManagerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
    *
127 127
    * @return void
128 128
    */
129
-  public function sanitizeValues(\stdClass &$values, $entityType);
129
+  public function sanitizeValues(\stdClass & $values, $entityType);
130 130
 
131 131
   /**
132 132
    * Check if a value is considered to be empty.
Please login to merge, or discard this patch.
src/PropertyMapper/PropertyDefinition.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -330,8 +330,7 @@
 block discarded – undo
330 330
           }
331 331
           $val = $this->factory($propType)->create($val, $propType);
332 332
         }
333
-      }
334
-      elseif (!($value instanceof EntityInterface)) {
333
+      } elseif (!($value instanceof EntityInterface)) {
335 334
         $value = $this->factory($propType)->create($value, $propType);
336 335
       }
337 336
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
    *
96 96
    * @return void
97 97
    */
98
-  public function sanitizeProperty(\stdClass &$object, FactoryContainerInterface $factoryContainer) {
98
+  public function sanitizeProperty(\stdClass & $object, FactoryContainerInterface $factoryContainer) {
99 99
     if (($entityType = $this->getEntityType()) && isset($object->{$this->getName()})) {
100 100
       $value = &$object->{$this->getName()};
101 101
       if ($this->isArray()) {
Please login to merge, or discard this patch.
src/Entity/EntityManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@
 block discarded – undo
307 307
   /**
308 308
    * {@inheritdoc}
309 309
    */
310
-  public function sanitizeValues(\stdClass &$values, $entityType) {
310
+  public function sanitizeValues(\stdClass & $values, $entityType) {
311 311
     foreach ($this->getPropertyMapDefinition($entityType)->getPropertyMaps() as $map) {
312 312
       $map->getDestination()->sanitizeProperty($values, $this->factoryContainer);
313 313
     }
Please login to merge, or discard this patch.