]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update psalm baseline 26656/head
authorVincent Petry <vincent@nextcloud.com>
Tue, 20 Apr 2021 15:07:16 +0000 (17:07 +0200)
committerVincent Petry <vincent@nextcloud.com>
Tue, 20 Apr 2021 15:13:31 +0000 (17:13 +0200)
And backport error suppression from stable21 in SFTP class.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
apps/files_external/lib/Lib/Storage/SFTP.php
build/psalm-baseline.xml

index d1aea027cee836ec550082d2485051b6b07bd60f..1941194f8f23fdfe3397045bd1bda2649d169f99 100644 (file)
@@ -141,6 +141,7 @@ class SFTP extends \OC\Files\Storage\Common {
 
                $login = false;
                foreach ($this->auth as $auth) {
+                       /** @psalm-suppress TooManyArguments */
                        $login = $this->client->login($this->user, $auth);
                        if ($login === true) {
                                break;
index 1b2ae9655a2d87358b4f6f63d8866c003899903d..a82e1b81c03969547d98142e0b05a75dc7943c2c 100644 (file)
       <code>$e-&gt;getCode()</code>
       <code>$e-&gt;getCode()</code>
     </InvalidScalarArgument>
-    <NullableReturnStatement occurrences="1">
-      <code>null</code>
-    </NullableReturnStatement>
     <ParamNameMismatch occurrences="2">
       <code>$source</code>
       <code>$target</code>
     <TooManyArguments occurrences="1">
       <code>test</code>
     </TooManyArguments>
-    <UndefinedClass occurrences="1">
-      <code>Exception</code>
-    </UndefinedClass>
-    <UndefinedDocblockClass occurrences="1">
-      <code>Exception</code>
-    </UndefinedDocblockClass>
   </file>
   <file src="apps/files_external/lib/Service/BackendService.php">
     <InvalidArgument occurrences="1">
     </InvalidDocblock>
   </file>
   <file src="apps/files_sharing/lib/External/Scanner.php">
-    <InvalidNullableReturnType occurrences="2">
-      <code>scan</code>
-      <code>array</code>
-    </InvalidNullableReturnType>
     <InvalidScalarArgument occurrences="1">
       <code>$recursive</code>
     </InvalidScalarArgument>
       <code>$query-&gt;createNamedParameter([IShare::TYPE_USER, IShare::TYPE_GROUP, IShare::TYPE_USERGROUP], IQueryBuilder::PARAM_INT_ARRAY)</code>
     </ImplicitToStringCast>
   </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">
     <InvalidScalarArgument occurrences="2">
       <code>$itemSource</code>
       <code>$data</code>
     </UndefinedInterfaceMethod>
   </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">
     <ImplicitToStringCast occurrences="4">
       <code>$builder-&gt;func()-&gt;greatest('mtime', $builder-&gt;createNamedParameter((int)$time, IQueryBuilder::PARAM_INT))</code>
     </InvalidScalarArgument>
   </file>
   <file src="lib/private/Files/Cache/Scanner.php">
-    <InvalidNullableReturnType occurrences="1">
-      <code>array</code>
-    </InvalidNullableReturnType>
     <InvalidReturnStatement occurrences="1">
       <code>$existingChildren</code>
     </InvalidReturnStatement>
       <code>$path</code>
       <code>self::SCAN_RECURSIVE_INCOMPLETE</code>
     </InvalidScalarArgument>
-    <NullableReturnStatement occurrences="4">
-      <code>null</code>
-      <code>null</code>
-      <code>null</code>
-      <code>null</code>
-    </NullableReturnStatement>
     <TypeDoesNotContainType occurrences="1">
       <code>$data ?? $this-&gt;getData($file)</code>
     </TypeDoesNotContainType>
     <ImplementedReturnTypeMismatch occurrences="1">
       <code>string|false</code>
     </ImplementedReturnTypeMismatch>
-    <InvalidNullableReturnType occurrences="2">
-      <code>getMetaData</code>
+    <InvalidNullableReturnType occurrences="1">
       <code>array</code>
     </InvalidNullableReturnType>
     <InvalidOperand occurrences="1">
       <code>$storage-&gt;updater</code>
       <code>$storage-&gt;updater</code>
     </NoInterfaceProperties>
-    <NullableReturnStatement occurrences="2">
-      <code>null</code>
+    <NullableReturnStatement occurrences="1">
       <code>$this-&gt;getStorageCache()-&gt;getAvailability()</code>
     </NullableReturnStatement>
   </file>
     <ImplicitToStringCast occurrences="1">
       <code>$file</code>
     </ImplicitToStringCast>
-    <InvalidNullableReturnType occurrences="1">
-      <code>getMetaData</code>
-    </InvalidNullableReturnType>
     <InvalidReturnStatement occurrences="3">
       <code>$helper-&gt;getFileSize($fullPath)</code>
       <code>file_put_contents($this-&gt;getSourcePath($path), $data)</code>
       <code>file_put_contents</code>
       <code>free_space</code>
     </InvalidReturnType>
-    <NullableReturnStatement occurrences="2">
-      <code>null</code>
+    <NullableReturnStatement occurrences="1">
       <code>$helper-&gt;getFileSize($fullPath)</code>
     </NullableReturnStatement>
     <TypeDoesNotContainNull occurrences="2">
     </NoInterfaceProperties>
   </file>
   <file src="lib/private/Files/Storage/Wrapper/Availability.php">
-    <InvalidNullableReturnType occurrences="34">
+    <InvalidNullableReturnType occurrences="33">
       <code>mkdir</code>
       <code>rmdir</code>
       <code>opendir</code>
       <code>getDirectDownload</code>
       <code>copyFromStorage</code>
       <code>moveFromStorage</code>
-      <code>getMetaData</code>
     </InvalidNullableReturnType>
     <InvalidReturnType occurrences="1">
       <code>\Traversable</code>
       <code>$source</code>
       <code>$target</code>
     </InvalidArgument>
-    <InvalidNullableReturnType occurrences="1">
-      <code>array</code>
-    </InvalidNullableReturnType>
     <InvalidReturnStatement occurrences="2">
       <code>$written</code>
       <code>$newUnencryptedSize</code>
       <code>$lastChunkPos</code>
       <code>$newUnencryptedSize</code>
     </InvalidScalarArgument>
-    <NullableReturnStatement occurrences="1">
-      <code>null</code>
-    </NullableReturnStatement>
     <UndefinedInterfaceMethod occurrences="7">
       <code>$info</code>
       <code>$info</code>
       <code>exec</code>
       <code>exec</code>
     </InvalidMethodCall>
-    <InvalidReturnStatement occurrences="1">
-      <code>self::$cache-&gt;exists($this-&gt;getNameSpace() . $key)</code>
-    </InvalidReturnStatement>
-    <InvalidReturnType occurrences="1">
-      <code>hasKey</code>
-    </InvalidReturnType>
   </file>
   <file src="lib/private/Migration/BackgroundRepair.php">
     <MoreSpecificImplementedParamType occurrences="1">