Run cs:fix

Signed-off-by: Raul <raul@nextcloud.com>
This commit is contained in:
Raul
2022-04-13 12:43:00 +02:00
parent 1d5fdef4b4
commit 0c5b1a88a6
5 changed files with 19 additions and 22 deletions

View File

@@ -91,12 +91,12 @@ class LabelService {
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
$boardLabels = $this->labelMapper->findAll($boardId);
foreach ($boardLabels as $boardLabel) {
if ($boardLabel->getTitle() === $title) {
throw new BadRequestException('title must be unique');
break;
}
}
foreach ($boardLabels as $boardLabel) {
if ($boardLabel->getTitle() === $title) {
throw new BadRequestException('title must be unique');
break;
}
}
if ($this->boardService->isArchived(null, $boardId)) {
throw new StatusException('Operation not allowed. This board is archived.');
@@ -161,15 +161,15 @@ class LabelService {
$label = $this->find($id);
$boardLabels = $this->labelMapper->findAll($label->getBoardId());
foreach ($boardLabels as $boardLabel) {
if ($boardLabel->getId() === $label->getId()) {
continue;
}
if ($boardLabel->getTitle() === $title) {
throw new BadRequestException('title must be unique');
break;
}
}
foreach ($boardLabels as $boardLabel) {
if ($boardLabel->getId() === $label->getId()) {
continue;
}
if ($boardLabel->getTitle() === $title) {
throw new BadRequestException('title must be unique');
break;
}
}
if ($this->boardService->isArchived($this->labelMapper, $id)) {
throw new StatusException('Operation not allowed. This board is archived.');