Remove unused variables
This commit is contained in:
@@ -61,7 +61,7 @@ class BoardService {
|
||||
return array_merge($userBoards, $groupBoards);
|
||||
}
|
||||
|
||||
public function find($userId, $boardId) {
|
||||
public function find($boardId) {
|
||||
$board = $this->boardMapper->find($boardId);
|
||||
return $board;
|
||||
}
|
||||
@@ -92,12 +92,12 @@ class BoardService {
|
||||
|
||||
}
|
||||
|
||||
public function delete($userId, $id) {
|
||||
return $this->boardMapper->delete($this->find($userId, $id));
|
||||
public function delete($id) {
|
||||
return $this->boardMapper->delete($this->find($id));
|
||||
}
|
||||
|
||||
public function update($id, $title, $userId, $color) {
|
||||
$board = $this->find($userId, $id);
|
||||
public function update($id, $title, $color) {
|
||||
$board = $this->find($id);
|
||||
$board->setTitle($title);
|
||||
$board->setColor($color);
|
||||
return $this->boardMapper->update($board);
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
|
||||
namespace OCA\Deck\Service;
|
||||
|
||||
|
||||
|
||||
|
||||
use \OCA\Deck\Db\Card;
|
||||
use \OCA\Deck\Db\CardMapper;
|
||||
use \OCA\Deck\CardArchivedException;
|
||||
@@ -35,12 +32,11 @@ class CardService {
|
||||
|
||||
private $cardMapper;
|
||||
|
||||
|
||||
public function __construct(CardMapper $cardMapper) {
|
||||
$this->cardMapper = $cardMapper;
|
||||
}
|
||||
|
||||
public function find($userId, $cardId) {
|
||||
public function find($cardId) {
|
||||
return $this->cardMapper->find($cardId);
|
||||
}
|
||||
public function create($title, $stackId, $type, $order, $owner) {
|
||||
@@ -54,7 +50,7 @@ class CardService {
|
||||
|
||||
}
|
||||
|
||||
public function delete($userId, $id) {
|
||||
public function delete($id) {
|
||||
return $this->cardMapper->delete($this->cardMapper->find($id));
|
||||
}
|
||||
|
||||
@@ -117,7 +113,7 @@ class CardService {
|
||||
return $this->cardMapper->update($card);
|
||||
}
|
||||
|
||||
public function assignLabel($userId, $cardId, $labelId) {
|
||||
public function assignLabel($cardId, $labelId) {
|
||||
$card = $this->cardMapper->find($cardId);
|
||||
if($card->getArchived()) {
|
||||
throw new CardArchivedException();
|
||||
@@ -125,7 +121,7 @@ class CardService {
|
||||
$this->cardMapper->assignLabel($cardId, $labelId);
|
||||
}
|
||||
|
||||
public function removeLabel($userId, $cardId, $labelId) {
|
||||
public function removeLabel($cardId, $labelId) {
|
||||
$card = $this->cardMapper->find($cardId);
|
||||
if($card->getArchived()) {
|
||||
throw new CardArchivedException();
|
||||
|
||||
@@ -43,12 +43,12 @@ class LabelService {
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
public function find($userId, $labelId) {
|
||||
public function find($labelId) {
|
||||
$label = $this->labelMapper->find($labelId);
|
||||
return $label;
|
||||
}
|
||||
|
||||
public function create($title, $userId, $color, $boardId) {
|
||||
public function create($title, $color, $boardId) {
|
||||
$label = new Label();
|
||||
$label->setTitle($title);
|
||||
$label->setColor($color);
|
||||
@@ -56,12 +56,12 @@ class LabelService {
|
||||
return $this->labelMapper->insert($label);
|
||||
}
|
||||
|
||||
public function delete($userId, $id) {
|
||||
return $this->labelMapper->delete($this->find($userId, $id));
|
||||
public function delete($id) {
|
||||
return $this->labelMapper->delete($this->find($id));
|
||||
}
|
||||
|
||||
public function update($id, $title, $userId, $color) {
|
||||
$label = $this->find($userId, $id);
|
||||
public function update($id, $title, $color) {
|
||||
$label = $this->find($id);
|
||||
$label->setTitle($title);
|
||||
$label->setColor($color);
|
||||
return $this->labelMapper->update($label);
|
||||
|
||||
@@ -90,7 +90,7 @@ class StackService {
|
||||
|
||||
}
|
||||
|
||||
public function delete($userId, $id) {
|
||||
public function delete($id) {
|
||||
return $this->stackMapper->delete($this->stackMapper->find($id));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user