Skip to content

Commit

Permalink
Developing the RequiredFields feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil Portugues Caldero committed Aug 11, 2016
1 parent 646c10d commit 490b15f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Server/Data/DataObject.php
Expand Up @@ -91,10 +91,10 @@ protected static function missingCreationAttributes(array $data, JsonApiSerializ
$diff = [];
if (null !== $mapping) {
$required = $mapping->getRequiredProperties();
$properties = !empty($required) ? $required : str_replace(
$properties = str_replace(
array_keys($mapping->getAliasedProperties()),
array_values($mapping->getAliasedProperties()),
$mapping->getProperties()
!empty($required) ? $required : $mapping->getProperties()
);
$properties = array_diff($properties, $mapping->getIdProperties());

Expand Down

0 comments on commit 490b15f

Please sign in to comment.