mirror of
https://github.com/Karaka-Management/oms-Support.git
synced 2026-01-11 17:18:40 +00:00
Remove mapper abstract duplication
This commit is contained in:
parent
36b8801c7b
commit
af93e40ee4
|
|
@ -72,30 +72,4 @@ class TicketMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static $primaryField = 'support_ticket_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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user