Code Duplication    Length = 8-9 lines in 2 locations

lib/Service/LabelService.php 1 location

@@ 45-52 (lines=8) @@
42
		return $this->labelMapper->find($labelId);
43
	}
44
45
	public function create($title, $color, $boardId) {
46
		$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
47
		$label = new Label();
48
		$label->setTitle($title);
49
		$label->setColor($color);
50
		$label->setBoardId($boardId);
51
		return $this->labelMapper->insert($label);
52
	}
53
54
	public function delete($id) {
55
		$this->permissionService->checkPermission($this->labelMapper, $id, Acl::PERMISSION_MANAGE);

lib/Service/StackService.php 1 location

@@ 82-90 (lines=9) @@
79
		return $stacks;
80
	}
81
82
	public function create($title, $boardId, $order) {
83
		$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
84
		$stack = new Stack();
85
		$stack->setTitle($title);
86
		$stack->setBoardId($boardId);
87
		$stack->setOrder($order);
88
		return $this->stackMapper->insert($stack);
89
90
	}
91
92
	public function delete($id) {
93
		$this->permissionService->checkPermission($this->stackMapper, $id, Acl::PERMISSION_MANAGE);