Remove unused is_object

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-03-05 09:27:28 +01:00
parent d11917e4ff
commit 4481fc1ace

View File

@@ -94,7 +94,7 @@ class LabelService {
//$this->checkDuplicateTitle($boardId, $title); //$this->checkDuplicateTitle($boardId, $title);
$boardLabels = $this->labelMapper->findAll($boardId); $boardLabels = $this->labelMapper->findAll($boardId);
if (is_array($boardLabels) || is_object($boardLabels)) { if (\is_array($boardLabels)) {
foreach($boardLabels as $boardLabel) { foreach($boardLabels as $boardLabel) {
if ($boardLabel->getTitle() === $title) { if ($boardLabel->getTitle() === $title) {
throw new BadRequestException('title must be unique'); throw new BadRequestException('title must be unique');
@@ -164,13 +164,12 @@ class LabelService {
} }
$this->permissionService->checkPermission($this->labelMapper, $id, Acl::PERMISSION_MANAGE); $this->permissionService->checkPermission($this->labelMapper, $id, Acl::PERMISSION_MANAGE);
$label = $this->find($id); $label = $this->find($id);
//$this->checkDuplicateTitle($label->getBoardId(), $title); //$this->checkDuplicateTitle($label->getBoardId(), $title);
$boardLabels = array();
$boardLabels = $this->labelMapper->findAll($label->getBoardId()); $boardLabels = $this->labelMapper->findAll($label->getBoardId());
if (is_array($boardLabels) || is_object($boardLabels)) { if (\is_array($boardLabels)) {
foreach($boardLabels as $boardLabel) { foreach($boardLabels as $boardLabel) {
if ($boardLabel->getId() === $label->getId()) { if ($boardLabel->getId() === $label->getId()) {
continue; continue;
@@ -181,7 +180,7 @@ class LabelService {
} }
} }
} }
if ($this->boardService->isArchived($this->labelMapper, $id)) { if ($this->boardService->isArchived($this->labelMapper, $id)) {
throw new StatusException('Operation not allowed. This board is archived.'); throw new StatusException('Operation not allowed. This board is archived.');
} }