Code Duplication    Length = 7-9 lines in 2 locations

lib/Service/LabelService.php 1 location

@@ 60-66 (lines=7) @@
57
	 * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
58
	 * @throws BadRequestException
59
	 */
60
	public function find($labelId) {
61
		if (is_numeric($labelId) === false) {
62
			throw new BadRequestException('label id must be a number');
63
		}
64
		$this->permissionService->checkPermission($this->labelMapper, $labelId, Acl::PERMISSION_READ);
65
		return $this->labelMapper->find($labelId);
66
	}
67
68
	/**
69
	 * @param $title

lib/Service/BoardService.php 1 location

@@ 360-368 (lines=9) @@
357
	 * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
358
	 * @throws BadRequestException
359
	 */
360
	public function deleteForce($id) {
361
		if (is_numeric($id) === false)  {
362
			throw new BadRequestException('id must be a number');
363
		}
364
365
		$this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_READ);
366
		$board = $this->find($id);
367
		return $this->boardMapper->delete($board);
368
	}
369
370
	/**
371
	 * @param $id