Răsfoiți Sursa

fix static analysis config

Ne-Lexa 4 ani în urmă
părinte
comite
8f43a3a75f
4 a modificat fișierele cu 17 adăugiri și 12 ștergeri
  1. 3 0
      .gitattributes
  2. 4 5
      .gitignore
  3. 0 1
      psalm.xml.dist
  4. 10 6
      src/Model/Extra/Fields/UnrecognizedExtraField.php

+ 3 - 0
.gitattributes

@@ -5,4 +5,7 @@
 bootstrap.php export-ignore
 logo.svg export-ignore
 phpunit.xml export-ignore
+phpunit.xml.dist export-ignore
+psalm.xml export-ignore
+psalm.xml.dist export-ignore
 tests export-ignore

+ 4 - 5
.gitignore

@@ -1,7 +1,6 @@
-/vendor
-*.iml
 /.idea
-/composer.lock
-/*.cache
 build/
-.phpunit.result.cache
+/vendor
+*.cache
+composer.lock
+psalm.xml

+ 0 - 1
psalm.xml → psalm.xml.dist

@@ -10,7 +10,6 @@
         <directory name="src" />
         <ignoreFiles>
             <directory name="vendor" />
-            <directory name="benchmarks" />
             <directory name="tests"/>
         </ignoreFiles>
     </projectFiles>

+ 10 - 6
src/Model/Extra/Fields/UnrecognizedExtraField.php

@@ -49,10 +49,12 @@ final class UnrecognizedExtraField implements ZipExtraField
     /**
      * Populate data from this array as if it was in local file data.
      *
-     * @param string    $buffer the buffer to read data from
-     * @param ?ZipEntry $entry
+     * @param string        $buffer the buffer to read data from
+     * @param ZipEntry|null $entry  optional zip entry
+     *
+     * @return UnrecognizedExtraField
      */
-    public static function unpackLocalFileData(string $buffer, ?ZipEntry $entry = null): ZipExtraField
+    public static function unpackLocalFileData(string $buffer, ?ZipEntry $entry = null): self
     {
         throw new RuntimeException('Unsupport parse');
     }
@@ -60,10 +62,12 @@ final class UnrecognizedExtraField implements ZipExtraField
     /**
      * Populate data from this array as if it was in central directory data.
      *
-     * @param string    $buffer the buffer to read data from
-     * @param ?ZipEntry $entry
+     * @param string        $buffer the buffer to read data from
+     * @param ZipEntry|null $entry  optional zip entry
+     *
+     * @return UnrecognizedExtraField
      */
-    public static function unpackCentralDirData(string $buffer, ?ZipEntry $entry = null): ZipExtraField
+    public static function unpackCentralDirData(string $buffer, ?ZipEntry $entry = null): self
     {
         throw new RuntimeException('Unsupport parse');
     }