Merge pull request #3793 from nextcloud/enh/upcomming_card_optimisation
Optimise upcomming overview creation
This commit is contained in:
@@ -158,6 +158,20 @@ class Card extends RelationalEntity {
|
|||||||
return $calendar;
|
return $calendar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDaysUntilDue(): ?int {
|
||||||
|
$today = new DateTime();
|
||||||
|
$match_date = $this->getDuedate();
|
||||||
|
if ($match_date === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$today->setTime(0, 0);
|
||||||
|
$match_date->setTime(0, 0);
|
||||||
|
|
||||||
|
$diff = $today->diff($match_date);
|
||||||
|
return (int) $diff->format('%R%a'); // Extract days count in interval
|
||||||
|
}
|
||||||
|
|
||||||
public function getCalendarPrefix(): string {
|
public function getCalendarPrefix(): string {
|
||||||
return 'card';
|
return 'card';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class RelationalEntity extends Entity implements \JsonSerializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __call($methodName, $args) {
|
public function __call(string $methodName, array $args) {
|
||||||
$attr = lcfirst(substr($methodName, 7));
|
$attr = lcfirst(substr($methodName, 7));
|
||||||
if (array_key_exists($attr, $this->_resolvedProperties) && strpos($methodName, 'resolve') === 0) {
|
if (array_key_exists($attr, $this->_resolvedProperties) && strpos($methodName, 'resolve') === 0) {
|
||||||
if ($this->_resolvedProperties[$attr] !== null) {
|
if ($this->_resolvedProperties[$attr] !== null) {
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ class BoardSummary extends Board {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getter(string $name): mixed {
|
||||||
|
return $this->board->getter($name);
|
||||||
|
}
|
||||||
|
|
||||||
public function __call($name, $arguments) {
|
public function __call($name, $arguments) {
|
||||||
return $this->board->__call($name, $arguments);
|
return $this->board->__call($name, $arguments);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
*/
|
*/
|
||||||
namespace OCA\Deck\Model;
|
namespace OCA\Deck\Model;
|
||||||
|
|
||||||
use DateTime;
|
|
||||||
use OCA\Deck\Db\Board;
|
use OCA\Deck\Db\Board;
|
||||||
use OCA\Deck\Db\Card;
|
use OCA\Deck\Db\Card;
|
||||||
|
|
||||||
@@ -41,6 +40,14 @@ class CardDetails extends Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function jsonSerialize(array $extras = []): array {
|
public function jsonSerialize(array $extras = []): array {
|
||||||
|
$array = parent::jsonSerialize();
|
||||||
|
$array['overdue'] = $this->getDueStatus();
|
||||||
|
|
||||||
|
unset($array['notified']);
|
||||||
|
unset($array['descriptionPrev']);
|
||||||
|
unset($array['relatedStack']);
|
||||||
|
unset($array['relatedBoard']);
|
||||||
|
|
||||||
$array = $this->card->jsonSerialize();
|
$array = $this->card->jsonSerialize();
|
||||||
unset($array['notified'], $array['descriptionPrev'], $array['relatedStack'], $array['relatedBoard']);
|
unset($array['notified'], $array['descriptionPrev'], $array['relatedStack'], $array['relatedBoard']);
|
||||||
|
|
||||||
@@ -51,30 +58,18 @@ class CardDetails extends Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function getDueStatus(): int {
|
private function getDueStatus(): int {
|
||||||
$today = new DateTime();
|
$diffDays = $this->getDaysUntilDue();
|
||||||
$today->setTime(0, 0);
|
if ($diffDays === null || $diffDays > 1) {
|
||||||
|
return static::DUEDATE_FUTURE;
|
||||||
$match_date = $this->card->getDuedate();
|
|
||||||
if (!$match_date) {
|
|
||||||
return Card::DUEDATE_FUTURE;
|
|
||||||
}
|
}
|
||||||
$match_date->setTime(0, 0);
|
|
||||||
|
|
||||||
$diff = $today->diff($match_date);
|
|
||||||
$diffDays = (int) $diff->format('%R%a'); // Extract days count in interval
|
|
||||||
|
|
||||||
|
|
||||||
if ($diffDays === 1) {
|
if ($diffDays === 1) {
|
||||||
return Card::DUEDATE_NEXT;
|
return static::DUEDATE_NEXT;
|
||||||
}
|
}
|
||||||
if ($diffDays === 0) {
|
if ($diffDays === 0) {
|
||||||
return Card::DUEDATE_NOW;
|
return static::DUEDATE_NOW;
|
||||||
}
|
|
||||||
if ($diffDays < 0) {
|
|
||||||
return Card::DUEDATE_OVERDUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Card::DUEDATE_FUTURE;
|
return static::DUEDATE_OVERDUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function appendBoardDetails(&$array): void {
|
private function appendBoardDetails(&$array): void {
|
||||||
@@ -86,7 +81,11 @@ class CardDetails extends Card {
|
|||||||
$array['board'] = (new BoardSummary($this->board))->jsonSerialize();
|
$array['board'] = (new BoardSummary($this->board))->jsonSerialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __call($name, $arguments) {
|
protected function getter(string $name): mixed {
|
||||||
return $this->card->__call($name, $arguments);
|
return $this->card->getter($name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __call(string $methodName, array $args) {
|
||||||
|
return $this->card->__call($methodName, $args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class OverviewService {
|
|||||||
|
|
||||||
public function findUpcomingCards(string $userId): array {
|
public function findUpcomingCards(string $userId): array {
|
||||||
$userBoards = $this->boardMapper->findAllForUser($userId);
|
$userBoards = $this->boardMapper->findAllForUser($userId);
|
||||||
$foundCards = [];
|
$overview = [];
|
||||||
foreach ($userBoards as $userBoard) {
|
foreach ($userBoards as $userBoard) {
|
||||||
if (count($userBoard->getAcl()) === 0) {
|
if (count($userBoard->getAcl()) === 0) {
|
||||||
// private board: get cards with due date
|
// private board: get cards with due date
|
||||||
@@ -103,14 +103,27 @@ class OverviewService {
|
|||||||
$cards = $this->cardMapper->findToMeOrNotAssignedCards($userBoard->getId(), $userId);
|
$cards = $this->cardMapper->findToMeOrNotAssignedCards($userBoard->getId(), $userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$foundCards[] = array_map(
|
foreach ($cards as $card) {
|
||||||
function (Card $card) use ($userBoard, $userId) {
|
$this->enrich($card, $userId);
|
||||||
$this->enrich($card, $userId);
|
$diffDays = $card->getDaysUntilDue();
|
||||||
return (new CardDetails($card, $userBoard))->jsonSerialize();
|
|
||||||
},
|
$key = 'later';
|
||||||
$cards
|
if ($diffDays === null) {
|
||||||
);
|
$key = 'nodue';
|
||||||
|
} elseif ($diffDays < 0) {
|
||||||
|
$key = 'overdue';
|
||||||
|
} elseif ($diffDays === 0) {
|
||||||
|
$key = 'today';
|
||||||
|
} elseif ($diffDays === 1) {
|
||||||
|
$key = 'tomorrow';
|
||||||
|
} elseif ($diffDays <= 7) {
|
||||||
|
$key = 'nextSevenDays';
|
||||||
|
}
|
||||||
|
|
||||||
|
$card = (new CardDetails($card, $userBoard));
|
||||||
|
$overview[$key][] = $card->jsonSerialize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return array_merge(...$foundCards);
|
return $overview;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,44 +31,44 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="isValidFilter" class="overview">
|
<div v-else-if="isValidFilter" class="overview">
|
||||||
<div v-if="cardsByDueDate.overdue.length > 0" class="dashboard-column">
|
<div v-if="assignedCardsDashboard.length > 0" class="dashboard-column">
|
||||||
<h3>{{ t('deck', 'Overdue') }}</h3>
|
<h3>{{ t('deck', 'Overdue') }}</h3>
|
||||||
<div v-for="card in cardsByDueDate.overdue" :key="card.id">
|
<div v-for="card in assignedCardsDashboard.overdue" :key="card.id">
|
||||||
<CardItem :id="card.id" />
|
<CardItem :id="card.id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-column">
|
<div class="dashboard-column">
|
||||||
<h3>{{ t('deck', 'Today') }}</h3>
|
<h3>{{ t('deck', 'Today') }}</h3>
|
||||||
<div v-for="card in cardsByDueDate.today" :key="card.id">
|
<div v-for="card in assignedCardsDashboard.today" :key="card.id">
|
||||||
<CardItem :id="card.id" />
|
<CardItem :id="card.id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-column">
|
<div class="dashboard-column">
|
||||||
<h3>{{ t('deck', 'Tomorrow') }}</h3>
|
<h3>{{ t('deck', 'Tomorrow') }}</h3>
|
||||||
<div v-for="card in cardsByDueDate.tomorrow" :key="card.id">
|
<div v-for="card in assignedCardsDashboard.tomorrow" :key="card.id">
|
||||||
<CardItem :id="card.id" />
|
<CardItem :id="card.id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-column">
|
<div class="dashboard-column">
|
||||||
<h3>{{ t('deck', 'Next 7 days') }}</h3>
|
<h3>{{ t('deck', 'Next 7 days') }}</h3>
|
||||||
<div v-for="card in cardsByDueDate.nextSevenDays" :key="card.id">
|
<div v-for="card in assignedCardsDashboard.nextSevenDays" :key="card.id">
|
||||||
<CardItem :id="card.id" />
|
<CardItem :id="card.id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-column">
|
<div class="dashboard-column">
|
||||||
<h3>{{ t('deck', 'Later') }}</h3>
|
<h3>{{ t('deck', 'Later') }}</h3>
|
||||||
<div v-for="card in cardsByDueDate.later" :key="card.id">
|
<div v-for="card in assignedCardsDashboard.later" :key="card.id">
|
||||||
<CardItem :id="card.id" />
|
<CardItem :id="card.id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-column">
|
<div class="dashboard-column">
|
||||||
<h3>{{ t('deck', 'No due') }}</h3>
|
<h3>{{ t('deck', 'No due') }}</h3>
|
||||||
<div v-for="card in cardsByDueDate.nodue" :key="card.id">
|
<div v-for="card in assignedCardsDashboard.nodue" :key="card.id">
|
||||||
<CardItem :id="card.id" />
|
<CardItem :id="card.id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,7 +83,6 @@
|
|||||||
import Controls from '../Controls.vue'
|
import Controls from '../Controls.vue'
|
||||||
import CardItem from '../cards/CardItem.vue'
|
import CardItem from '../cards/CardItem.vue'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import moment from '@nextcloud/moment'
|
|
||||||
import GlobalSearchResults from '../search/GlobalSearchResults.vue'
|
import GlobalSearchResults from '../search/GlobalSearchResults.vue'
|
||||||
|
|
||||||
const FILTER_UPCOMING = 'upcoming'
|
const FILTER_UPCOMING = 'upcoming'
|
||||||
@@ -125,13 +124,6 @@ export default {
|
|||||||
...mapGetters([
|
...mapGetters([
|
||||||
'assignedCardsDashboard',
|
'assignedCardsDashboard',
|
||||||
]),
|
]),
|
||||||
cardsByDueDate() {
|
|
||||||
switch (this.filter) {
|
|
||||||
case FILTER_UPCOMING:
|
|
||||||
return this.groupByDue(this.assignedCardsDashboard)
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route.params.filter'() {
|
'$route.params.filter'() {
|
||||||
@@ -153,47 +145,6 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
|
||||||
groupByDue(dataset) {
|
|
||||||
const all = {
|
|
||||||
nodue: [],
|
|
||||||
overdue: [],
|
|
||||||
today: [],
|
|
||||||
tomorrow: [],
|
|
||||||
nextSevenDays: [],
|
|
||||||
later: [],
|
|
||||||
}
|
|
||||||
dataset.forEach(card => {
|
|
||||||
if (card.duedate === null) {
|
|
||||||
all.nodue.push(card)
|
|
||||||
} else {
|
|
||||||
const hours = Math.floor(moment(card.duedate).diff(this.$root.time, 'seconds') / 60 / 60)
|
|
||||||
const d = new Date()
|
|
||||||
const currentHour = d.getHours()
|
|
||||||
if (hours < 0) {
|
|
||||||
all.overdue.push(card)
|
|
||||||
}
|
|
||||||
if (hours >= 0 && hours < (24 - currentHour)) {
|
|
||||||
all.today.push(card)
|
|
||||||
}
|
|
||||||
if (hours >= (24 - currentHour) && hours < (48 - currentHour)) {
|
|
||||||
all.tomorrow.push(card)
|
|
||||||
}
|
|
||||||
if (hours >= (48 - currentHour) && hours < (24 * 7)) {
|
|
||||||
all.nextSevenDays.push(card)
|
|
||||||
}
|
|
||||||
if (hours >= (24 * 7)) {
|
|
||||||
all.later.push(card)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
Object.keys(all).forEach((list) => {
|
|
||||||
all[list] = all[list].sort((a, b) => {
|
|
||||||
return (new Date(a.duedate)).getTime() - (new Date(b.duedate)).getTime()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
return all
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,12 +43,14 @@ export default {
|
|||||||
actions: {
|
actions: {
|
||||||
async loadUpcoming({ commit }) {
|
async loadUpcoming({ commit }) {
|
||||||
commit('setCurrentBoard', null)
|
commit('setCurrentBoard', null)
|
||||||
const assignedCards = await apiClient.get('upcoming')
|
const upcommingCards = await apiClient.get('upcoming')
|
||||||
const assignedCardsFlat = assignedCards.flat()
|
|
||||||
for (const i in assignedCardsFlat) {
|
for (const dueStatus in upcommingCards) {
|
||||||
commit('addCard', assignedCardsFlat[i])
|
for (const idx in upcommingCards[dueStatus]) {
|
||||||
|
commit('addCard', upcommingCards[dueStatus][idx])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
commit('setAssignedCards', assignedCardsFlat)
|
commit('setAssignedCards', upcommingCards)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +1,40 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<files psalm-version="5.4.0@62db5d4f6a7ae0a20f7cc5a4952d730272fc0863">
|
<files psalm-version="5.6.0@e784128902dfe01d489c4123d69918a9f3c1eac5">
|
||||||
<file src="lib/Activity/Filter.php">
|
<file src="lib/Activity/Filter.php">
|
||||||
<MethodSignatureMismatch occurrences="1">
|
<MethodSignatureMismatch>
|
||||||
<code>$types</code>
|
<code>$types</code>
|
||||||
</MethodSignatureMismatch>
|
</MethodSignatureMismatch>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Command/UserExport.php">
|
<file src="lib/Command/UserExport.php">
|
||||||
<ImplementedReturnTypeMismatch occurrences="1">
|
<ImplementedReturnTypeMismatch>
|
||||||
<code>void</code>
|
<code>void</code>
|
||||||
</ImplementedReturnTypeMismatch>
|
</ImplementedReturnTypeMismatch>
|
||||||
<UndefinedThisPropertyAssignment occurrences="2">
|
<UndefinedThisPropertyAssignment>
|
||||||
<code>$this->boardMapper</code>
|
<code>$this->boardMapper</code>
|
||||||
<code>$this->stackMapper</code>
|
<code>$this->stackMapper</code>
|
||||||
</UndefinedThisPropertyAssignment>
|
</UndefinedThisPropertyAssignment>
|
||||||
<UndefinedThisPropertyFetch occurrences="2">
|
<UndefinedThisPropertyFetch>
|
||||||
<code>$this->boardMapper</code>
|
<code>$this->boardMapper</code>
|
||||||
<code>$this->stackMapper</code>
|
<code>$this->stackMapper</code>
|
||||||
</UndefinedThisPropertyFetch>
|
</UndefinedThisPropertyFetch>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Controller/BoardApiController.php">
|
<file src="lib/Controller/BoardApiController.php">
|
||||||
<TypeDoesNotContainNull occurrences="2">
|
<TypeDoesNotContainNull>
|
||||||
<code>$modified === null</code>
|
<code>$modified === null</code>
|
||||||
<code>$modified === null</code>
|
<code>$modified === null</code>
|
||||||
</TypeDoesNotContainNull>
|
</TypeDoesNotContainNull>
|
||||||
<UndefinedClass occurrences="1">
|
<UndefinedClass>
|
||||||
<code>Util</code>
|
<code>Util</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
<UndefinedThisPropertyAssignment occurrences="1">
|
<UndefinedThisPropertyAssignment>
|
||||||
<code>$this->userId</code>
|
<code>$this->userId</code>
|
||||||
</UndefinedThisPropertyAssignment>
|
</UndefinedThisPropertyAssignment>
|
||||||
<UndefinedThisPropertyFetch occurrences="1">
|
<UndefinedThisPropertyFetch>
|
||||||
<code>$this->userId</code>
|
<code>$this->userId</code>
|
||||||
</UndefinedThisPropertyFetch>
|
</UndefinedThisPropertyFetch>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Controller/CommentsApiController.php">
|
<file src="lib/Controller/CommentsApiController.php">
|
||||||
<InvalidScalarArgument occurrences="6">
|
<InvalidScalarArgument>
|
||||||
<code>$cardId</code>
|
<code>$cardId</code>
|
||||||
<code>$cardId</code>
|
<code>$cardId</code>
|
||||||
<code>$cardId</code>
|
<code>$cardId</code>
|
||||||
@@ -44,95 +44,108 @@
|
|||||||
</InvalidScalarArgument>
|
</InvalidScalarArgument>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Controller/PageController.php">
|
<file src="lib/Controller/PageController.php">
|
||||||
<UndefinedClass occurrences="1">
|
<UndefinedClass>
|
||||||
<code>LoadSidebar</code>
|
<code>LoadSidebar</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Controller/StackApiController.php">
|
<file src="lib/Controller/StackApiController.php">
|
||||||
<RedundantCondition occurrences="1">
|
<RedundantCondition>
|
||||||
<code>$modified !== null</code>
|
<code>$modified !== null</code>
|
||||||
</RedundantCondition>
|
</RedundantCondition>
|
||||||
<UndefinedClass occurrences="1">
|
<UndefinedClass>
|
||||||
<code>Util</code>
|
<code>Util</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/DAV/Calendar.php">
|
<file src="lib/DAV/Calendar.php">
|
||||||
<UndefinedClass occurrences="1">
|
<UndefinedClass>
|
||||||
<code>ExternalCalendar</code>
|
<code>ExternalCalendar</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/DAV/CalendarObject.php">
|
<file src="lib/DAV/CalendarObject.php">
|
||||||
<UndefinedClass occurrences="1">
|
<UndefinedClass>
|
||||||
<code>ICalendarObject</code>
|
<code>ICalendarObject</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/DAV/CalendarPlugin.php">
|
<file src="lib/DAV/CalendarPlugin.php">
|
||||||
<UndefinedClass occurrences="1">
|
<UndefinedClass>
|
||||||
<code>ICalendarProvider</code>
|
<code>ICalendarProvider</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/DAV/DeckCalendarBackend.php">
|
<file src="lib/DAV/DeckCalendarBackend.php">
|
||||||
<UndefinedClass occurrences="1">
|
<UndefinedClass>
|
||||||
<code>NotFound</code>
|
<code>NotFound</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Db/Card.php">
|
<file src="lib/Db/Card.php">
|
||||||
<UndefinedClass occurrences="2">
|
<UndefinedClass>
|
||||||
<code>VCalendar</code>
|
<code>VCalendar</code>
|
||||||
<code>VCalendar</code>
|
<code>VCalendar</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Db/CardMapper.php">
|
<file src="lib/Db/CardMapper.php">
|
||||||
<InvalidScalarArgument occurrences="1">
|
<InvalidScalarArgument>
|
||||||
<code>$entity->getId()</code>
|
<code>$entity->getId()</code>
|
||||||
</InvalidScalarArgument>
|
</InvalidScalarArgument>
|
||||||
<UndefinedInterfaceMethod occurrences="1">
|
<UndefinedInterfaceMethod>
|
||||||
<code>getUserIdGroups</code>
|
<code>getUserIdGroups</code>
|
||||||
</UndefinedInterfaceMethod>
|
</UndefinedInterfaceMethod>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Db/LabelMapper.php">
|
<file src="lib/Db/LabelMapper.php">
|
||||||
<ParamNameMismatch occurrences="1">
|
<ParamNameMismatch>
|
||||||
<code>$labelId</code>
|
<code>$labelId</code>
|
||||||
</ParamNameMismatch>
|
</ParamNameMismatch>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Db/RelationalEntity.php">
|
|
||||||
<MethodSignatureMismatch occurrences="1">
|
|
||||||
<code>$attribute</code>
|
|
||||||
</MethodSignatureMismatch>
|
|
||||||
</file>
|
|
||||||
<file src="lib/Db/Stack.php">
|
<file src="lib/Db/Stack.php">
|
||||||
<UndefinedClass occurrences="2">
|
<UndefinedClass>
|
||||||
<code>VCalendar</code>
|
<code>VCalendar</code>
|
||||||
<code>VCalendar</code>
|
<code>VCalendar</code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="lib/Model/BoardSummary.php">
|
||||||
|
<ConstructorSignatureMismatch>
|
||||||
|
<code>public function __construct(Board $board) {</code>
|
||||||
|
<code>public function __construct(Board $board) {</code>
|
||||||
|
</ConstructorSignatureMismatch>
|
||||||
|
</file>
|
||||||
|
<file src="lib/Model/CardDetails.php">
|
||||||
|
<ConstructorSignatureMismatch>
|
||||||
|
<code>public function __construct(Card $card, ?Board $board = null) {</code>
|
||||||
|
<code>public function __construct(Card $card, ?Board $board = null) {</code>
|
||||||
|
</ConstructorSignatureMismatch>
|
||||||
|
</file>
|
||||||
<file src="lib/Service/AttachmentService.php">
|
<file src="lib/Service/AttachmentService.php">
|
||||||
<InvalidCatch occurrences="1"/>
|
<InvalidCatch>
|
||||||
|
<code>try {
|
||||||
|
$attachment = $this->attachmentMapper->find($attachmentId);
|
||||||
|
} catch (IMapperException $e) {
|
||||||
|
throw new NoPermissionException('Permission denied');
|
||||||
|
}</code>
|
||||||
|
</InvalidCatch>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Service/BoardService.php">
|
<file src="lib/Service/BoardService.php">
|
||||||
<TooManyArguments occurrences="2">
|
<TooManyArguments>
|
||||||
<code>findAll</code>
|
<code>findAll</code>
|
||||||
<code>findAll</code>
|
<code>findAll</code>
|
||||||
</TooManyArguments>
|
</TooManyArguments>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Service/CirclesService.php">
|
<file src="lib/Service/CirclesService.php">
|
||||||
<RedundantCondition occurrences="1">
|
<RedundantCondition>
|
||||||
<code>$member !== null</code>
|
<code>$member !== null</code>
|
||||||
</RedundantCondition>
|
</RedundantCondition>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Service/FileService.php">
|
<file src="lib/Service/FileService.php">
|
||||||
<RedundantCondition occurrences="2">
|
<RedundantCondition>
|
||||||
<code>is_resource($content)</code>
|
<code>is_resource($content)</code>
|
||||||
<code>is_resource($content)</code>
|
<code>is_resource($content)</code>
|
||||||
</RedundantCondition>
|
</RedundantCondition>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Sharing/DeckShareProvider.php">
|
<file src="lib/Sharing/DeckShareProvider.php">
|
||||||
<InvalidReturnType occurrences="1">
|
<InvalidReturnType>
|
||||||
<code>getShareByToken</code>
|
<code>getShareByToken</code>
|
||||||
</InvalidReturnType>
|
</InvalidReturnType>
|
||||||
</file>
|
</file>
|
||||||
<file src="lib/Sharing/Listener.php">
|
<file src="lib/Sharing/Listener.php">
|
||||||
<InvalidArgument occurrences="1">
|
<InvalidArgument>
|
||||||
<code>[self::class, 'listenPreShare']</code>
|
<code>[self::class, 'listenPreShare']</code>
|
||||||
</InvalidArgument>
|
</InvalidArgument>
|
||||||
</file>
|
</file>
|
||||||
|
|||||||
Reference in New Issue
Block a user