Merge pull request #26656 from nextcloud/psalm/noid/update-psalm-baseline/stable20

[stable20] Update psalm baseline
This commit is contained in:
Morris Jobke 2021-04-20 17:50:48 +02:00 committed by GitHub
commit 72857fe0b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 63 deletions

View File

@ -141,6 +141,7 @@ class SFTP extends \OC\Files\Storage\Common {
$login = false; $login = false;
foreach ($this->auth as $auth) { foreach ($this->auth as $auth) {
/** @psalm-suppress TooManyArguments */
$login = $this->client->login($this->user, $auth); $login = $this->client->login($this->user, $auth);
if ($login === true) { if ($login === true) {
break; break;

View File

@ -1615,9 +1615,6 @@
<code>$e-&gt;getCode()</code> <code>$e-&gt;getCode()</code>
<code>$e-&gt;getCode()</code> <code>$e-&gt;getCode()</code>
</InvalidScalarArgument> </InvalidScalarArgument>
<NullableReturnStatement occurrences="1">
<code>null</code>
</NullableReturnStatement>
<ParamNameMismatch occurrences="2"> <ParamNameMismatch occurrences="2">
<code>$source</code> <code>$source</code>
<code>$target</code> <code>$target</code>
@ -1660,12 +1657,6 @@
<TooManyArguments occurrences="1"> <TooManyArguments occurrences="1">
<code>test</code> <code>test</code>
</TooManyArguments> </TooManyArguments>
<UndefinedClass occurrences="1">
<code>Exception</code>
</UndefinedClass>
<UndefinedDocblockClass occurrences="1">
<code>Exception</code>
</UndefinedDocblockClass>
</file> </file>
<file src="apps/files_external/lib/Service/BackendService.php"> <file src="apps/files_external/lib/Service/BackendService.php">
<InvalidArgument occurrences="1"> <InvalidArgument occurrences="1">
@ -1838,10 +1829,6 @@
</InvalidDocblock> </InvalidDocblock>
</file> </file>
<file src="apps/files_sharing/lib/External/Scanner.php"> <file src="apps/files_sharing/lib/External/Scanner.php">
<InvalidNullableReturnType occurrences="2">
<code>scan</code>
<code>array</code>
</InvalidNullableReturnType>
<InvalidScalarArgument occurrences="1"> <InvalidScalarArgument occurrences="1">
<code>$recursive</code> <code>$recursive</code>
</InvalidScalarArgument> </InvalidScalarArgument>
@ -1882,14 +1869,6 @@
<code>$query-&gt;createNamedParameter([IShare::TYPE_USER, IShare::TYPE_GROUP, IShare::TYPE_USERGROUP], IQueryBuilder::PARAM_INT_ARRAY)</code> <code>$query-&gt;createNamedParameter([IShare::TYPE_USER, IShare::TYPE_GROUP, IShare::TYPE_USERGROUP], IQueryBuilder::PARAM_INT_ARRAY)</code>
</ImplicitToStringCast> </ImplicitToStringCast>
</file> </file>
<file src="apps/files_sharing/lib/Scanner.php">
<InvalidNullableReturnType occurrences="1">
<code>array</code>
</InvalidNullableReturnType>
<NullableReturnStatement occurrences="1">
<code>null</code>
</NullableReturnStatement>
</file>
<file src="apps/files_sharing/lib/ShareBackend/File.php"> <file src="apps/files_sharing/lib/ShareBackend/File.php">
<InvalidScalarArgument occurrences="2"> <InvalidScalarArgument occurrences="2">
<code>$itemSource</code> <code>$itemSource</code>
@ -3959,16 +3938,6 @@
<code>$data</code> <code>$data</code>
</UndefinedInterfaceMethod> </UndefinedInterfaceMethod>
</file> </file>
<file src="lib/private/Files/Cache/LocalRootScanner.php">
<InvalidNullableReturnType occurrences="2">
<code>scanFile</code>
<code>scan</code>
</InvalidNullableReturnType>
<NullableReturnStatement occurrences="2">
<code>null</code>
<code>null</code>
</NullableReturnStatement>
</file>
<file src="lib/private/Files/Cache/Propagator.php"> <file src="lib/private/Files/Cache/Propagator.php">
<ImplicitToStringCast occurrences="4"> <ImplicitToStringCast occurrences="4">
<code>$builder-&gt;func()-&gt;greatest('mtime', $builder-&gt;createNamedParameter((int)$time, IQueryBuilder::PARAM_INT))</code> <code>$builder-&gt;func()-&gt;greatest('mtime', $builder-&gt;createNamedParameter((int)$time, IQueryBuilder::PARAM_INT))</code>
@ -3985,9 +3954,6 @@
</InvalidScalarArgument> </InvalidScalarArgument>
</file> </file>
<file src="lib/private/Files/Cache/Scanner.php"> <file src="lib/private/Files/Cache/Scanner.php">
<InvalidNullableReturnType occurrences="1">
<code>array</code>
</InvalidNullableReturnType>
<InvalidReturnStatement occurrences="1"> <InvalidReturnStatement occurrences="1">
<code>$existingChildren</code> <code>$existingChildren</code>
</InvalidReturnStatement> </InvalidReturnStatement>
@ -3998,12 +3964,6 @@
<code>$path</code> <code>$path</code>
<code>self::SCAN_RECURSIVE_INCOMPLETE</code> <code>self::SCAN_RECURSIVE_INCOMPLETE</code>
</InvalidScalarArgument> </InvalidScalarArgument>
<NullableReturnStatement occurrences="4">
<code>null</code>
<code>null</code>
<code>null</code>
<code>null</code>
</NullableReturnStatement>
<TypeDoesNotContainType occurrences="1"> <TypeDoesNotContainType occurrences="1">
<code>$data ?? $this-&gt;getData($file)</code> <code>$data ?? $this-&gt;getData($file)</code>
</TypeDoesNotContainType> </TypeDoesNotContainType>
@ -4399,8 +4359,7 @@
<ImplementedReturnTypeMismatch occurrences="1"> <ImplementedReturnTypeMismatch occurrences="1">
<code>string|false</code> <code>string|false</code>
</ImplementedReturnTypeMismatch> </ImplementedReturnTypeMismatch>
<InvalidNullableReturnType occurrences="2"> <InvalidNullableReturnType occurrences="1">
<code>getMetaData</code>
<code>array</code> <code>array</code>
</InvalidNullableReturnType> </InvalidNullableReturnType>
<InvalidOperand occurrences="1"> <InvalidOperand occurrences="1">
@ -4422,8 +4381,7 @@
<code>$storage-&gt;updater</code> <code>$storage-&gt;updater</code>
<code>$storage-&gt;updater</code> <code>$storage-&gt;updater</code>
</NoInterfaceProperties> </NoInterfaceProperties>
<NullableReturnStatement occurrences="2"> <NullableReturnStatement occurrences="1">
<code>null</code>
<code>$this-&gt;getStorageCache()-&gt;getAvailability()</code> <code>$this-&gt;getStorageCache()-&gt;getAvailability()</code>
</NullableReturnStatement> </NullableReturnStatement>
</file> </file>
@ -4527,9 +4485,6 @@
<ImplicitToStringCast occurrences="1"> <ImplicitToStringCast occurrences="1">
<code>$file</code> <code>$file</code>
</ImplicitToStringCast> </ImplicitToStringCast>
<InvalidNullableReturnType occurrences="1">
<code>getMetaData</code>
</InvalidNullableReturnType>
<InvalidReturnStatement occurrences="3"> <InvalidReturnStatement occurrences="3">
<code>$helper-&gt;getFileSize($fullPath)</code> <code>$helper-&gt;getFileSize($fullPath)</code>
<code>file_put_contents($this-&gt;getSourcePath($path), $data)</code> <code>file_put_contents($this-&gt;getSourcePath($path), $data)</code>
@ -4540,8 +4495,7 @@
<code>file_put_contents</code> <code>file_put_contents</code>
<code>free_space</code> <code>free_space</code>
</InvalidReturnType> </InvalidReturnType>
<NullableReturnStatement occurrences="2"> <NullableReturnStatement occurrences="1">
<code>null</code>
<code>$helper-&gt;getFileSize($fullPath)</code> <code>$helper-&gt;getFileSize($fullPath)</code>
</NullableReturnStatement> </NullableReturnStatement>
<TypeDoesNotContainNull occurrences="2"> <TypeDoesNotContainNull occurrences="2">
@ -4559,7 +4513,7 @@
</NoInterfaceProperties> </NoInterfaceProperties>
</file> </file>
<file src="lib/private/Files/Storage/Wrapper/Availability.php"> <file src="lib/private/Files/Storage/Wrapper/Availability.php">
<InvalidNullableReturnType occurrences="34"> <InvalidNullableReturnType occurrences="33">
<code>mkdir</code> <code>mkdir</code>
<code>rmdir</code> <code>rmdir</code>
<code>opendir</code> <code>opendir</code>
@ -4593,7 +4547,6 @@
<code>getDirectDownload</code> <code>getDirectDownload</code>
<code>copyFromStorage</code> <code>copyFromStorage</code>
<code>moveFromStorage</code> <code>moveFromStorage</code>
<code>getMetaData</code>
</InvalidNullableReturnType> </InvalidNullableReturnType>
<InvalidReturnType occurrences="1"> <InvalidReturnType occurrences="1">
<code>\Traversable</code> <code>\Traversable</code>
@ -4654,9 +4607,6 @@
<code>$source</code> <code>$source</code>
<code>$target</code> <code>$target</code>
</InvalidArgument> </InvalidArgument>
<InvalidNullableReturnType occurrences="1">
<code>array</code>
</InvalidNullableReturnType>
<InvalidReturnStatement occurrences="2"> <InvalidReturnStatement occurrences="2">
<code>$written</code> <code>$written</code>
<code>$newUnencryptedSize</code> <code>$newUnencryptedSize</code>
@ -4669,9 +4619,6 @@
<code>$lastChunkPos</code> <code>$lastChunkPos</code>
<code>$newUnencryptedSize</code> <code>$newUnencryptedSize</code>
</InvalidScalarArgument> </InvalidScalarArgument>
<NullableReturnStatement occurrences="1">
<code>null</code>
</NullableReturnStatement>
<UndefinedInterfaceMethod occurrences="7"> <UndefinedInterfaceMethod occurrences="7">
<code>$info</code> <code>$info</code>
<code>$info</code> <code>$info</code>
@ -5112,12 +5059,6 @@
<code>exec</code> <code>exec</code>
<code>exec</code> <code>exec</code>
</InvalidMethodCall> </InvalidMethodCall>
<InvalidReturnStatement occurrences="1">
<code>self::$cache-&gt;exists($this-&gt;getNameSpace() . $key)</code>
</InvalidReturnStatement>
<InvalidReturnType occurrences="1">
<code>hasKey</code>
</InvalidReturnType>
</file> </file>
<file src="lib/private/Migration/BackgroundRepair.php"> <file src="lib/private/Migration/BackgroundRepair.php">
<MoreSpecificImplementedParamType occurrences="1"> <MoreSpecificImplementedParamType occurrences="1">