Skip to content

Commit c2352cb

Browse files
committed
chore(psalm): Fix or silence last psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent a87636a commit c2352cb

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/CacheListener.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public function onCacheEvent(ICacheEvent $event): void {
3333
if (!$storage->instanceOfStorage(Jail::class)) {
3434
return;
3535
}
36-
if ($path = $storage->getJailedPath($event->getPath())) {
36+
/** @var Jail $storage */
37+
$path = $storage->getJailedPath($event->getPath());
38+
if ($path !== null) {
3739
$event->setPath($path);
3840
}
3941
}

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
<issueHandlers>
131131
<LessSpecificReturnType errorLevel="error"/>
132132
<PossiblyNullOperand errorLevel="error"/>
133+
<ClassMustBeFinal errorLevel="suppress" />
133134
</issueHandlers>
134135
<plugins>
135136
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>

0 commit comments

Comments
 (0)