fix: Centralize usage of CardDetails

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-02-27 23:45:33 +01:00
parent c1a16c9e85
commit 0b2ea0f839
5 changed files with 20 additions and 14 deletions

View File

@@ -33,6 +33,7 @@ use OCA\Deck\Db\Label;
use OCA\Deck\Db\LabelMapper;
use OCA\Deck\Db\Stack;
use OCA\Deck\Db\StackMapper;
use OCA\Deck\Model\CardDetails;
use OCA\Deck\Validators\StackServiceValidator;
use OCP\EventDispatcher\IEventDispatcher;
use Psr\Log\LoggerInterface;
@@ -121,6 +122,9 @@ class StackServiceTest extends TestCase {
foreach ($cards as $card) {
$card->setLabels($this->getLabels()[$card->getId()]);
}
return array_map(function ($card) {
return new CardDetails($card);
}, $cards);
}
)
);