Remove mapper abstract duplication

This commit is contained in:
Dennis Eichhorn 2017-11-08 21:18:31 +01:00
parent 008528d0fc
commit 4a5160aac4
3 changed files with 0 additions and 78 deletions

View File

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

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

@ -99,30 +99,4 @@ class WikiDocMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $primaryField = 'wiki_article_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;
}
}