Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Activity/ChangeSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function getAfter() {
return $this->after;
}

#[\Override]
public function jsonSerialize(): array {
return [
'before' => $this->getBefore(),
Expand Down
1 change: 1 addition & 0 deletions lib/Activity/DeckProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function __construct(IURLGenerator $urlGenerator, ActivityManager $activi
* @throws UnknownActivityException Should be thrown if your provider does not know this event
* @since 11.0.0
*/
#[\Override]
public function parse($language, IEvent $event, ?IEvent $previousEvent = null): IEvent {
if ($event->getApp() !== 'deck') {
throw new UnknownActivityException();
Expand Down
6 changes: 6 additions & 0 deletions lib/Activity/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function __construct(
* @return string Lowercase a-z and underscore only identifier
* @since 11.0.0
*/
#[\Override]
public function getIdentifier(): string {
return 'deck';
}
Expand All @@ -34,6 +35,7 @@ public function getIdentifier(): string {
* @return string A translated string
* @since 11.0.0
*/
#[\Override]
public function getName(): string {
return $this->l10n->t('Deck');
}
Expand All @@ -44,6 +46,7 @@ public function getName(): string {
* priority values. It is required to return a value between 0 and 100.
* @since 11.0.0
*/
#[\Override]
public function getPriority(): int {
return 90;
}
Expand All @@ -52,6 +55,7 @@ public function getPriority(): int {
* @return string Full URL to an icon, empty string when none is given
* @since 11.0.0
*/
#[\Override]
public function getIcon(): string {
return $this->urlGenerator->imagePath('deck', 'deck-dark.svg');
}
Expand All @@ -61,6 +65,7 @@ public function getIcon(): string {
* @return string[] An array of allowed apps from which activities should be displayed
* @since 11.0.0
*/
#[\Override]
public function filterTypes($types): array {
return array_merge($types, ['deck_comment']);
}
Expand All @@ -69,6 +74,7 @@ public function filterTypes($types): array {
* @return string[] An array of allowed apps from which activities should be displayed
* @since 11.0.0
*/
#[\Override]
public function allowedApps(): array {
return ['deck'];
}
Expand Down
9 changes: 9 additions & 0 deletions lib/Activity/SettingBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ public function __construct(IL10N $l) {
$this->l = $l;
}

#[\Override]
public function getGroupIdentifier() {
return 'deck';
}

#[\Override]
public function getGroupName() {
return $this->l->t('Deck');
}
Expand All @@ -34,6 +36,7 @@ public function getGroupName() {
* @return string Lowercase a-z and underscore only identifier
* @since 11.0.0
*/
#[\Override]
public function getIdentifier(): string {
return 'deck';
}
Expand All @@ -42,6 +45,7 @@ public function getIdentifier(): string {
* @return string A translated string
* @since 11.0.0
*/
#[\Override]
public function getName(): string {
return $this->l->t('Changes in the <strong>Deck app</strong>');
}
Expand All @@ -52,6 +56,7 @@ public function getName(): string {
* priority values. It is required to return a value between 0 and 100.
* @since 11.0.0
*/
#[\Override]
public function getPriority(): int {
return 90;
}
Expand All @@ -60,6 +65,7 @@ public function getPriority(): int {
* @return bool True when the option can be changed for the stream
* @since 11.0.0
*/
#[\Override]
public function canChangeStream(): bool {
return true;
}
Expand All @@ -68,6 +74,7 @@ public function canChangeStream(): bool {
* @return bool True when the option can be changed for the stream
* @since 11.0.0
*/
#[\Override]
public function isDefaultEnabledStream(): bool {
return true;
}
Expand All @@ -76,6 +83,7 @@ public function isDefaultEnabledStream(): bool {
* @return bool True when the option can be changed for the mail
* @since 11.0.0
*/
#[\Override]
public function canChangeMail(): bool {
return true;
}
Expand All @@ -84,6 +92,7 @@ public function canChangeMail(): bool {
* @return bool True when the option can be changed for the stream
* @since 11.0.0
*/
#[\Override]
public function isDefaultEnabledMail(): bool {
return false;
}
Expand Down
7 changes: 7 additions & 0 deletions lib/Activity/SettingChanges.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SettingChanges extends SettingBase {
* @return string Lowercase a-z and underscore only identifier
* @since 11.0.0
*/
#[\Override]
public function getIdentifier(): string {
return 'deck';
}
Expand All @@ -20,6 +21,7 @@ public function getIdentifier(): string {
* @return string A translated string
* @since 11.0.0
*/
#[\Override]
public function getName(): string {
return $this->l->t('A <strong>board, list or card</strong> was changed');
}
Expand All @@ -30,6 +32,7 @@ public function getName(): string {
* priority values. It is required to return a value between 0 and 100.
* @since 11.0.0
*/
#[\Override]
public function getPriority(): int {
return 90;
}
Expand All @@ -38,6 +41,7 @@ public function getPriority(): int {
* @return bool True when the option can be changed for the stream
* @since 11.0.0
*/
#[\Override]
public function canChangeStream(): bool {
return true;
}
Expand All @@ -46,6 +50,7 @@ public function canChangeStream(): bool {
* @return bool True when the option can be changed for the stream
* @since 11.0.0
*/
#[\Override]
public function isDefaultEnabledStream(): bool {
return true;
}
Expand All @@ -54,6 +59,7 @@ public function isDefaultEnabledStream(): bool {
* @return bool True when the option can be changed for the mail
* @since 11.0.0
*/
#[\Override]
public function canChangeMail(): bool {
return true;
}
Expand All @@ -62,6 +68,7 @@ public function canChangeMail(): bool {
* @return bool True when the option can be changed for the stream
* @since 11.0.0
*/
#[\Override]
public function isDefaultEnabledMail(): bool {
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Activity/SettingComment.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class SettingComment extends SettingBase {
* @return string Lowercase a-z and underscore only identifier
* @since 11.0.0
*/
#[\Override]
public function getIdentifier(): string {
return 'deck_comment';
}
Expand All @@ -24,6 +25,7 @@ public function getIdentifier(): string {
* @return string A translated string
* @since 11.0.0
*/
#[\Override]
public function getName(): string {
return $this->l->t('A <strong>comment</strong> was created on a card');
}
Expand All @@ -32,6 +34,7 @@ public function getName(): string {
* @return bool True when the option can be changed for the stream
* @since 11.0.0
*/
#[\Override]
public function canChangeStream(): bool {
return false;
}
Expand Down
2 changes: 2 additions & 0 deletions lib/Activity/SettingDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class SettingDescription extends SettingBase {
* @return string Lowercase a-z and underscore only identifier
* @since 11.0.0
*/
#[\Override]
public function getIdentifier(): string {
return 'deck_card_description';
}
Expand All @@ -21,6 +22,7 @@ public function getIdentifier(): string {
* @return string A translated string
* @since 11.0.0
*/
#[\Override]
public function getName(): string {
return $this->l->t('A <strong>card description</strong> has been changed');
}
Expand Down
2 changes: 2 additions & 0 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function __construct(array $urlParams = []) {
});
}

#[\Override]
public function boot(IBootContext $context): void {
$context->injectFn($this->registerCommentsEntity(...));
$context->injectFn($this->registerCollaborationResources(...));
Expand All @@ -126,6 +127,7 @@ public function boot(IBootContext $context): void {
$context->injectFn([$this, 'registerCloudFederationProviderManager']);
}

#[\Override]
public function register(IRegistrationContext $context): void {
if ((@include_once __DIR__ . '/../../vendor/autoload.php') === false) {
throw new Exception('Cannot include autoload. Did you run install dependencies using composer?');
Expand Down
1 change: 1 addition & 0 deletions lib/BadRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function __construct($message) {
parent::__construct($message);
}

#[\Override]
public function getStatus() {
return HTTP::STATUS_BAD_REQUEST;
}
Expand Down
1 change: 1 addition & 0 deletions lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function __construct(IAppManager $appManager, PermissionService $permissi
* @return array{deck: array{version: string, canCreateBoards: bool, supportsDoneColumn:true, apiVersions: array<string>}}
* @since 8.2.0
*/
#[\Override]
public function getCapabilities() {
return [
'deck' => [
Expand Down
3 changes: 3 additions & 0 deletions lib/Collaboration/Resources/ResourceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function __construct(BoardMapper $boardMapper, PermissionService $permiss
* @return string
* @since 15.0.0
*/
#[\Override]
public function getType(): string {
return self::RESOURCE_TYPE;
}
Expand All @@ -55,6 +56,7 @@ public function getType(): string {
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @since 16.0.0
*/
#[\Override]
public function getResourceRichObject(IResource $resource): array {
$board = $this->getBoard($resource);
$link = $this->urlGenerator->linkToRoute('deck.page.indexBoard', ['boardId' => $resource->getId()]);
Expand All @@ -76,6 +78,7 @@ public function getResourceRichObject(IResource $resource): array {
* @return bool
* @since 16.0.0
*/
#[\Override]
public function canAccessResource(IResource $resource, ?IUser $user): bool {
if ($resource->getType() !== self::RESOURCE_TYPE || !$user instanceof IUser) {
return false;
Expand Down
3 changes: 3 additions & 0 deletions lib/Collaboration/Resources/ResourceProviderCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function __construct(CardMapper $cardMapper, BoardMapper $boardMapper, Pe
* @return string
* @since 15.0.0
*/
#[\Override]
public function getType(): string {
return self::RESOURCE_TYPE;
}
Expand All @@ -56,6 +57,7 @@ public function getType(): string {
* @return array
* @since 16.0.0
*/
#[\Override]
public function getResourceRichObject(IResource $resource): array {
try {
$card = $this->cardMapper->find($resource->getId());
Expand Down Expand Up @@ -88,6 +90,7 @@ public function getResourceRichObject(IResource $resource): array {
* @return bool
* @since 16.0.0
*/
#[\Override]
public function canAccessResource(IResource $resource, ?IUser $user): bool {
if (!$user instanceof IUser || $resource->getType() !== self::RESOURCE_TYPE) {
return false;
Expand Down
2 changes: 2 additions & 0 deletions lib/Command/BoardImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function __construct(
/**
* @return void
*/
#[\Override]
protected function configure() {
$allowedSystems = $this->boardImportCommandService->getAllowedImportSystems();
$names = array_map(function ($name) {
Expand Down Expand Up @@ -67,6 +68,7 @@ protected function configure() {
*
* @return int
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$this
->boardImportCommandService
Expand Down
2 changes: 2 additions & 0 deletions lib/Command/CalendarToggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function __construct(IUserManager $userManager, IConfig $config) {
$this->config = $config;
}

#[\Override]
protected function configure() {
$this
->setName('deck:calendar-toggle')
Expand All @@ -42,6 +43,7 @@ protected function configure() {
);
}

#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$enable = $input->getOption('on');
$disable = $input->getOption('off');
Expand Down
2 changes: 2 additions & 0 deletions lib/Command/TransferOwnership.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function __construct(BoardService $boardService, BoardMapper $boardMapper
$this->questionHelper = $questionHelper;
}

#[\Override]
protected function configure() {
$this
->setName('deck:transfer-ownership')
Expand Down Expand Up @@ -61,6 +62,7 @@ protected function configure() {
;
}

#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$owner = $input->getArgument('owner');
$newOwner = $input->getArgument('newOwner');
Expand Down
2 changes: 2 additions & 0 deletions lib/Command/UserExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function __construct(
parent::__construct();
}

#[\Override]
protected function configure() {
$this
->setName('deck:export')
Expand All @@ -50,6 +51,7 @@ protected function configure() {
/**
* @throws Exception
*/
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$userId = $input->getArgument('user-id');
$legacyFormat = $input->getOption('legacy-format');
Expand Down
1 change: 1 addition & 0 deletions lib/Cron/CardDescriptionActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function __construct(ITimeFactory $time, ActivityManager $activityManager
* @param $argument
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
#[\Override]
public function run($argument) {
$cards = $this->cardMapper->findUnexposedDescriptionChances();
foreach ($cards as $card) {
Expand Down
1 change: 1 addition & 0 deletions lib/Cron/DeleteCron.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function __construct(
* @param $argument
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
#[\Override]
protected function run($argument) {
$timeLimit = time() - $this->configService->getTrashRetention();

Expand Down
1 change: 1 addition & 0 deletions lib/Cron/ScheduledNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function __construct(
* @param $argument
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
#[\Override]
public function run($argument) {
// Notify board owner and card creator about overdue cards
$cards = $this->cardMapper->findOverdue();
Expand Down
Loading
Loading