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');
@@ -168,9 +168,8 @@ class LabelService {
$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;