Fix php cs issues

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-04-22 19:57:19 +02:00
parent 7ad5daabeb
commit 52febb396c
130 changed files with 1068 additions and 1424 deletions

View File

@@ -30,7 +30,6 @@ use OCA\Deck\Db\LabelMapper;
use OCA\Deck\StatusException;
use OCA\Deck\BadRequestException;
class LabelService {
/** @var LabelMapper */
@@ -77,7 +76,6 @@ class LabelService {
* @throws BadRequestException
*/
public function create($title, $color, $boardId) {
if ($title === false || $title === null) {
throw new BadRequestException('title must be provided');
}
@@ -94,7 +92,7 @@ class LabelService {
$boardLabels = $this->labelMapper->findAll($boardId);
if (\is_array($boardLabels)) {
foreach($boardLabels as $boardLabel) {
foreach ($boardLabels as $boardLabel) {
if ($boardLabel->getTitle() === $title) {
throw new BadRequestException('title must be unique');
break;
@@ -123,7 +121,6 @@ class LabelService {
* @throws BadRequestException
*/
public function delete($id) {
if (is_numeric($id) === false) {
throw new BadRequestException('label id must be a number');
}
@@ -149,7 +146,6 @@ class LabelService {
* @throws BadRequestException
*/
public function update($id, $title, $color) {
if (is_numeric($id) === false) {
throw new BadRequestException('label id must be a number');
}
@@ -168,7 +164,7 @@ class LabelService {
$boardLabels = $this->labelMapper->findAll($label->getBoardId());
if (\is_array($boardLabels)) {
foreach($boardLabels as $boardLabel) {
foreach ($boardLabels as $boardLabel) {
if ($boardLabel->getId() === $label->getId()) {
continue;
}
@@ -188,5 +184,4 @@ class LabelService {
$this->changeHelper->boardChanged($label->getBoardId());
return $this->labelMapper->update($label);
}
}