Code style fixings.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
committed by
Julius Härtl
parent
f97c7c3f7b
commit
7d9fc83dc9
@@ -78,7 +78,7 @@ class BoardApiController extends ApiController {
|
||||
public function get() {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$board = $this->service->find($this->request->params['boardId']);
|
||||
@@ -103,11 +103,11 @@ class BoardApiController extends ApiController {
|
||||
public function create($title, $color) {
|
||||
|
||||
if ($title === false) {
|
||||
return new DataResponse("title must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('title must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($color === false) {
|
||||
return new DataResponse("color must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('color must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$board = $this->service->create($title, $this->userId, $color);
|
||||
@@ -133,19 +133,19 @@ class BoardApiController extends ApiController {
|
||||
public function update($title, $color, $archived = false) {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_bool($archived) === false) {
|
||||
return new DataResponse("archived must be a boolean", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('archived must be a boolean', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($title === false) {
|
||||
return new DataResponse("title must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('title must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($color === false) {
|
||||
return new DataResponse("color must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('color must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$board = $this->service->update($this->request->params['boardId'], $title, $color, $archived);
|
||||
@@ -168,7 +168,7 @@ class BoardApiController extends ApiController {
|
||||
public function delete() {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$board = $this->service->delete($this->request->params['boardId']);
|
||||
@@ -191,7 +191,7 @@ class BoardApiController extends ApiController {
|
||||
public function undoDelete() {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$board = $this->service->find($this->request->params['boardId']);
|
||||
|
||||
@@ -61,15 +61,15 @@ class CardApiController extends ApiController {
|
||||
public function get() {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['stackId']) === false) {
|
||||
return new DataResponse("stack id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('stack id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['cardId']) === false) {
|
||||
return new DataResponse("card id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('card id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$card = $this->cardService->find($this->request->params['cardId']);
|
||||
@@ -95,19 +95,19 @@ class CardApiController extends ApiController {
|
||||
public function create($title, $type = 'plain', $order = 999) {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['stackId']) === false) {
|
||||
return new DataResponse("stack id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('stack id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($title === false || $title === null) {
|
||||
return new DataResponse("title must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('title must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($order) === false) {
|
||||
return new DataResponse("order must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('order must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -137,31 +137,31 @@ class CardApiController extends ApiController {
|
||||
public function update($title, $type, $order, $description = null, $duedate = null, $archive = false, $assignedUserId = 0) {
|
||||
|
||||
if (is_numeric($this->request->params['cardId']) === false) {
|
||||
return new DataResponse("card id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('card id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['stackId']) === false) {
|
||||
return new DataResponse("stack id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('stack id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($title === false || $title === null) {
|
||||
return new DataResponse("title must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('title must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($order) === false) {
|
||||
return new DataResponse("order must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('order must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_bool($order) === false) {
|
||||
return new DataResponse("archive must be a boolean", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('archive must be a boolean', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($assignedUserId) === false) {
|
||||
return new DataResponse("user id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('user id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -204,15 +204,15 @@ class CardApiController extends ApiController {
|
||||
public function delete() {
|
||||
|
||||
if (is_numeric($this->request->params['cardId']) === false) {
|
||||
return new DataResponse("card id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('card id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['stackId']) === false) {
|
||||
return new DataResponse("stack id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('stack id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -62,11 +62,11 @@ class LabelApiController extends ApiController {
|
||||
public function get() {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['labelId']) === false) {
|
||||
return new DataResponse("label id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('label id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$label = $this->labelService->find($this->request->params['labelId']);
|
||||
@@ -90,15 +90,15 @@ class LabelApiController extends ApiController {
|
||||
public function create($title, $color) {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($title === false || $title === null) {
|
||||
return new DataResponse("title must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('title must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($color === false || $color === null) {
|
||||
return new DataResponse("color must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('color must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -122,19 +122,19 @@ class LabelApiController extends ApiController {
|
||||
public function update($title, $color) {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['labelId']) === false) {
|
||||
return new DataResponse("label id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('label id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($title === false || $title === null) {
|
||||
return new DataResponse("title must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('title must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if ($color === false || $color === null) {
|
||||
return new DataResponse("color must be provided", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('color must be provided', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -156,11 +156,11 @@ class LabelApiController extends ApiController {
|
||||
public function delete() {
|
||||
|
||||
if (is_numeric($this->request->params['boardId']) === false) {
|
||||
return new DataResponse("board id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('board id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
if (is_numeric($this->request->params['labelId']) === false) {
|
||||
return new DataResponse("label id must be a number", HTTP::STATUS_BAD_REQUEST);
|
||||
return new DataResponse('label id must be a number', HTTP::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user