Code Duplication    Length = 15-15 lines in 2 locations

lib/Db/BoardMapper.php 1 location

@@ 39-53 (lines=15) @@
36
	private $userManager;
37
	private $groupManager;
38
39
	public function __construct(
40
		IDBConnection $db,
41
		LabelMapper $labelMapper,
42
		AclMapper $aclMapper,
43
		StackMapper $stackMapper,
44
		IUserManager $userManager,
45
		IGroupManager $groupManager
46
	) {
47
		parent::__construct($db, 'deck_boards', Board::class);
48
		$this->labelMapper = $labelMapper;
49
		$this->aclMapper = $aclMapper;
50
		$this->stackMapper = $stackMapper;
51
		$this->userManager = $userManager;
52
		$this->groupManager = $groupManager;
53
	}
54
55
56
	/**

lib/Db/CardMapper.php 1 location

@@ 43-57 (lines=15) @@
40
	private $databaseType;
41
	private $database4ByteSupport;
42
43
	public function __construct(
44
		IDBConnection $db,
45
		LabelMapper $labelMapper,
46
		IUserManager $userManager,
47
		IManager $notificationManager,
48
		$databaseType = 'sqlite',
49
		$database4ByteSupport = true
50
	) {
51
		parent::__construct($db, 'deck_cards', Card::class);
52
		$this->labelMapper = $labelMapper;
53
		$this->userManager = $userManager;
54
		$this->notificationManager = $notificationManager;
55
		$this->databaseType = $databaseType;
56
		$this->database4ByteSupport = $database4ByteSupport;
57
	}
58
59
	public function insert(Entity $entity) {
60
		$entity->setDatabaseType($this->databaseType);