Remove mapper abstract duplication

This commit is contained in:
Dennis Eichhorn 2017-11-08 21:18:31 +01:00
parent 83c5c98955
commit 390d8b0bfd
2 changed files with 0 additions and 49 deletions

View File

@ -72,29 +72,4 @@ class CommentListMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $primaryField = 'comments_list_id';
/**
* Create object.
*
* @param mixed $obj Object
* @param int $relations Behavior for relations creation
*
* @return mixed
*
* @since 1.0.0
*/
public static function create($obj, int $relations = RelationType::ALL)
{
try {
$objId = parent::create($obj, $relations);
if ($objId === null || !is_scalar($objId)) {
return $objId;
}
} catch (\Exception $e) {
return false;
}
return $objId;
}
}

View File

@ -71,28 +71,4 @@ class CommentMapper extends DataMapperAbstract
*/
protected static $primaryField = 'comments_comment_id';
/**
* Create object.
*
* @param mixed $obj Object
* @param int $relations Behavior for relations creation
*
* @return mixed
*
* @since 1.0.0
*/
public static function create($obj, int $relations = RelationType::ALL)
{
try {
$objId = parent::create($obj, $relations);
if ($objId === null || !is_scalar($objId)) {
return $objId;
}
} catch (\Exception $e) {
return false;
}
return $objId;
}
}