Skip to content

Commit

Permalink
Fix psalm errors
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Dec 14, 2020
1 parent adc0012 commit 57a298f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
15 changes: 2 additions & 13 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
<InvalidReturnType occurrences="1">
<code>string[]</code>
</InvalidReturnType>
<NullableReturnStatement occurrences="9">
<NullableReturnStatement occurrences="8">
<code>null</code>
<code>$this-&gt;circleToPrincipal($name)</code>
<code>null</code>
Expand Down Expand Up @@ -3400,9 +3400,6 @@
<code>strtolower</code>
</RedundantCondition>
</file>
<file src="lib/private/AppFramework/ScopedPsrLogger.php">
<InvalidArgument occurrences="1"/>
</file>
<file src="lib/private/AppFramework/Services/AppConfig.php">
<MoreSpecificImplementedParamType occurrences="1">
<code>$default</code>
Expand Down Expand Up @@ -4793,14 +4790,6 @@
<code>true</code>
</InvalidReturnType>
</file>
<file src="lib/private/Files/Stream/Encryption.php">
<InvalidScalarArgument occurrences="1">
<code>$position</code>
</InvalidScalarArgument>
<UndefinedInterfaceMethod occurrences="1">
<code>$cacheEntry</code>
</UndefinedInterfaceMethod>
</file>
<file src="lib/private/Files/Stream/SeekableHttpStream.php">
<FalsableReturnStatement occurrences="3">
<code>false</code>
Expand Down Expand Up @@ -5529,7 +5518,7 @@
<code>'OCP\Share::postUnshareFromSelf'</code>
<code>$data</code>
</InvalidArgument>
<InvalidScalarArgument occurrences="3">
<InvalidScalarArgument occurrences="2">
<code>$this-&gt;shareApiLinkDefaultExpireDays()</code>
<code>$this-&gt;shareApiLinkDefaultExpireDays()</code>
<code>$id</code>
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Avatar/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ protected function generateAvatarFromSvg(int $size) {
$avatar->readImageBlob($svg);
$avatar->setImageFormat('png');
$image = new OC_Image();
$image->loadFromData($avatar);
return $image->data();
$image->loadFromData((string)$avatar);
return $image->data() ?? false;
} catch (\Exception $e) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Http/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private function getCertBundle(): string {
// $this->certificateManager->getAbsoluteBundlePath() tries to instantiate
// a view
if ($this->config->getSystemValue('installed', false)) {
return $this->certificateManager->getAbsoluteBundlePath(null);
return $this->certificateManager->getAbsoluteBundlePath('');
}

return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
Expand Down

0 comments on commit 57a298f

Please sign in to comment.