]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(IStorage): Use false instead of bool intersection type to match implementations fix/istorage/return-types 48219/head
authorprovokateurin <kate@provokateurin.de>
Thu, 19 Sep 2024 13:47:26 +0000 (15:47 +0200)
committerprovokateurin <kate@provokateurin.de>
Thu, 26 Sep 2024 16:13:03 +0000 (18:13 +0200)
Signed-off-by: provokateurin <kate@provokateurin.de>
build/psalm-baseline.xml
lib/public/Files/Storage/IStorage.php

index c093a8792de072582a0a4f0992b7b3f53eca5ddb..5bd84ba170b8d07ec9f0ecba7314dd24143c75c5 100644 (file)
       <code><![CDATA[remove]]></code>
     </UndefinedMethod>
   </file>
-  <file src="lib/private/Files/ObjectStore/ObjectStoreStorage.php">
-    <InvalidScalarArgument>
-      <code><![CDATA[$source]]></code>
-    </InvalidScalarArgument>
-  </file>
   <file src="lib/private/Files/ObjectStore/S3ConnectionTrait.php">
     <InternalClass>
       <code><![CDATA[ClientResolver::_default_signature_provider()]]></code>
       <code><![CDATA[$size]]></code>
     </InvalidScalarArgument>
   </file>
-  <file src="lib/private/Files/Storage/Wrapper/Jail.php">
-    <InvalidReturnStatement>
-      <code><![CDATA[$this->getWrapperStorage()->filetype($this->getUnjailedPath($path))]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType/>
-  </file>
-  <file src="lib/private/Files/Storage/Wrapper/Wrapper.php">
-    <InvalidReturnStatement/>
-    <InvalidReturnType/>
-  </file>
   <file src="lib/private/Files/Stream/SeekableHttpStream.php">
     <InvalidReturnType>
       <code><![CDATA[stream_close]]></code>
index 2368e126bb7c8952af3f681d9ade0022583ad50c..924e91e8164a4dc7ed2e12ef5c0cfd18976deb48 100644 (file)
@@ -87,7 +87,7 @@ interface IStorage {
         * only the following keys are required in the result: size and mtime
         *
         * @param string $path
-        * @return array|bool
+        * @return array|false
         * @since 9.0.0
         */
        public function stat($path);
@@ -96,7 +96,7 @@ interface IStorage {
         * see https://www.php.net/manual/en/function.filetype.php
         *
         * @param string $path
-        * @return string|bool
+        * @return string|false
         * @since 9.0.0
         */
        public function filetype($path);
@@ -106,7 +106,7 @@ interface IStorage {
         * The result for filesize when called on a folder is required to be 0
         *
         * @param string $path
-        * @return false|int|float
+        * @return int|float|false
         * @since 9.0.0
         */
        public function filesize($path);
@@ -179,7 +179,7 @@ interface IStorage {
         * see https://www.php.net/manual/en/function.filemtime.php
         *
         * @param string $path
-        * @return int|bool
+        * @return int|false
         * @since 9.0.0
         */
        public function filemtime($path);
@@ -237,7 +237,7 @@ interface IStorage {
         *
         * @param string $path
         * @param string $mode
-        * @return resource|bool
+        * @return resource|false
         * @since 9.0.0
         */
        public function fopen($path, $mode);
@@ -247,7 +247,7 @@ interface IStorage {
         * The mimetype for a folder is required to be "httpd/unix-directory"
         *
         * @param string $path
-        * @return string|bool
+        * @return string|false
         * @since 9.0.0
         */
        public function getMimeType($path);
@@ -258,16 +258,16 @@ interface IStorage {
         * @param string $type
         * @param string $path
         * @param bool $raw
-        * @return string|bool
+        * @return string|false
         * @since 9.0.0
         */
        public function hash($type, $path, $raw = false);
 
        /**
-        * see https://www.php.net/manual/en/function.free_space.php
+        * see https://www.php.net/manual/en/function.disk-free-space.php
         *
         * @param string $path
-        * @return int|float|bool
+        * @return int|float|false
         * @since 9.0.0
         */
        public function free_space($path);
@@ -345,7 +345,7 @@ interface IStorage {
         * For now the returned array can hold the parameter url - in future more attributes might follow.
         *
         * @param string $path
-        * @return array|bool
+        * @return array|false
         * @since 9.0.0
         */
        public function getDirectDownload($path);