PHPdoc and small fixes
This commit is contained in:
@@ -29,7 +29,6 @@ use OCA\Deck\Db\Label;
|
||||
use OCP\ILogger;
|
||||
use OCP\IL10N;
|
||||
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
|
||||
use \OCA\Deck\Db\Board;
|
||||
use \OCA\Deck\Db\BoardMapper;
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Service;
|
||||
|
||||
class CardArchivedException extends \Exception {
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $msg the error message
|
||||
*/
|
||||
public function __construct($msg){
|
||||
parent::__construct($msg);
|
||||
}
|
||||
}
|
||||
@@ -27,8 +27,6 @@ use OCA\Deck\Db\Label;
|
||||
use OCP\ILogger;
|
||||
use OCP\IL10N;
|
||||
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
|
||||
|
||||
use \OCA\Deck\Db\LabelMapper;
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Service;
|
||||
|
||||
class ServicePermissionException extends \Exception {
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $msg the error message
|
||||
*/
|
||||
public function __construct($msg){
|
||||
parent::__construct($msg);
|
||||
}
|
||||
}
|
||||
@@ -54,13 +54,14 @@ class StackService {
|
||||
public function findAll($boardId) {
|
||||
$stacks = $this->stackMapper->findAll($boardId);
|
||||
$labels = $this->labelMapper->getAssignedLabelsForBoard($boardId);
|
||||
|
||||
foreach ($stacks as $idx => $s) {
|
||||
$cards = $this->cardMapper->findAll($s->id);
|
||||
foreach ($cards as $idxc => $card) {
|
||||
$cards[$idxc]->setLabels($labels[$card->id]);
|
||||
foreach ($stacks as $stackIndex => $stack) {
|
||||
$cards = $this->cardMapper->findAll($stack->id);
|
||||
foreach ($cards as $cardIndex => $card) {
|
||||
if(array_key_exists($card->id, $labels)) {
|
||||
$cards[$cardIndex]->setLabels($labels[$card->id]);
|
||||
}
|
||||
}
|
||||
$stacks[$idx]->setCards($cards);
|
||||
$stacks[$stackIndex]->setCards($cards);
|
||||
}
|
||||
return $stacks;
|
||||
}
|
||||
@@ -68,12 +69,14 @@ class StackService {
|
||||
public function findAllArchived($boardId) {
|
||||
$stacks = $this->stackMapper->findAll($boardId);
|
||||
$labels = $this->labelMapper->getAssignedLabelsForBoard($boardId);
|
||||
foreach ($stacks as $idx => $s) {
|
||||
$cards = $this->cardMapper->findAllArchived($s->id);
|
||||
foreach ($cards as $idxc => $card) {
|
||||
$cards[$idxc]->setLabels($labels[$card->id]);
|
||||
foreach ($stacks as $stackIndex => $stack) {
|
||||
$cards = $this->cardMapper->findAllArchived($stack->id);
|
||||
foreach ($cards as $cardIndex => $card) {
|
||||
if(array_key_exists($card->id, $labels)) {
|
||||
$cards[$cardIndex]->setLabels($labels[$card->id]);
|
||||
}
|
||||
}
|
||||
$stacks[$idx]->setCards($cards);
|
||||
$stacks[$stackIndex]->setCards($cards);
|
||||
}
|
||||
return $stacks;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user