Skip to content

Commit

Permalink
fix psalm
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Feb 8, 2024
1 parent b0c57ed commit ae20ce2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/settings/lib/Settings/Personal/ServerDevNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public function getForm(): TemplateResponse {

// If the Reasons to use Nextcloud.pdf file is here, let's init Viewer, also check that Viewer is there
if (class_exists(LoadViewer::class) && $userFolder->nodeExists('Reasons to use Nextcloud.pdf')) {
// Make a zero-cost assertion in order to fix Psalm
assert(class_exists(LoadViewer::class));

Check failure

Code scanning / Psalm

RedundantCondition Error

OCA\Viewer\Event\LoadViewer::class is class-string has already been asserted

Check failure on line 84 in apps/settings/lib/Settings/Personal/ServerDevNotice.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

RedundantCondition

apps/settings/lib/Settings/Personal/ServerDevNotice.php:84:4: RedundantCondition: OCA\Viewer\Event\LoadViewer::class is class-string has already been asserted (see https://psalm.dev/122)
$this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());
$hasInitialState = true;
}
Expand Down

0 comments on commit ae20ce2

Please sign in to comment.