Remove mapper abstract duplication

This commit is contained in:
Dennis Eichhorn 2017-11-08 21:18:31 +01:00
parent b9e213f6c9
commit 457bc6657c
5 changed files with 0 additions and 130 deletions

View File

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

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

View File

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

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

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