Remove mapper abstract duplication

This commit is contained in:
Dennis Eichhorn 2017-11-08 21:18:31 +01:00
parent bf44c6e70b
commit 4741cf9dc2
2 changed files with 0 additions and 52 deletions

View File

@ -49,30 +49,4 @@ class BadgeMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $primaryField = 'news_badge_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

@ -73,30 +73,4 @@ class NewsArticleMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $createdAt = 'news_created_at';
/**
* 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;
}
}