@@ -48,6 +48,7 @@ public function setCompression($level = 9, $type = Archive::COMPRESS_AUTO)
4848 *
4949 * @param string $file
5050 * @throws ArchiveIOException
51+ * @throws ArchiveIllegalCompressionException
5152 */
5253 public function open ($ file )
5354 {
@@ -82,6 +83,7 @@ public function open($file)
8283 * Reopen the file with open() again if you want to do additional operations
8384 *
8485 * @throws ArchiveIOException
86+ * @throws ArchiveCorruptedException
8587 * @returns FileInfo[]
8688 */
8789 public function contents ()
@@ -123,11 +125,12 @@ public function contents()
123125 * The archive is closed afer reading the contents, because rewinding is not possible in bzip2 streams.
124126 * Reopen the file with open() again if you want to do additional operations
125127 *
126- * @param string $outdir the target directory for extracting
127- * @param int|string $strip either the number of path components or a fixed prefix to strip
128- * @param string $exclude a regular expression of files to exclude
129- * @param string $include a regular expression of files to include
128+ * @param string $outdir the target directory for extracting
129+ * @param int|string $strip either the number of path components or a fixed prefix to strip
130+ * @param string $exclude a regular expression of files to exclude
131+ * @param string $include a regular expression of files to include
130132 * @throws ArchiveIOException
133+ * @throws ArchiveCorruptedException
131134 * @return FileInfo[]
132135 */
133136 public function extract ($ outdir , $ strip = '' , $ exclude = '' , $ include = '' )
@@ -204,6 +207,7 @@ public function extract($outdir, $strip = '', $exclude = '', $include = '')
204207 *
205208 * @param string $file
206209 * @throws ArchiveIOException
210+ * @throws ArchiveIllegalCompressionException
207211 */
208212 public function create ($ file = '' )
209213 {
@@ -240,6 +244,7 @@ public function create($file = '')
240244 * @param string|FileInfo $fileinfo either the name to us in archive (string) or a FileInfo oject with all meta data, empty to take from original
241245 * @throws ArchiveCorruptedException when the file changes while reading it, the archive will be corrupt and should be deleted
242246 * @throws ArchiveIOException there was trouble reading the given file, it was not added
247+ * @throws FileInfoException trouble reading file info, it was not added
243248 */
244249 public function addFile ($ file , $ fileinfo = '' )
245250 {
@@ -325,6 +330,7 @@ public function addData($fileinfo, $data)
325330 * consists of two 512 blocks of zero bytes"
326331 *
327332 * @link http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html#SEC134
333+ * @throws ArchiveIOException
328334 */
329335 public function close ()
330336 {
@@ -360,6 +366,7 @@ public function close()
360366 * Returns the created in-memory archive data
361367 *
362368 * This implicitly calls close() on the Archive
369+ * @throws ArchiveIOException
363370 */
364371 public function getArchive ()
365372 {
@@ -386,6 +393,7 @@ public function getArchive()
386393 *
387394 * @param string $file
388395 * @throws ArchiveIOException
396+ * @throws ArchiveIllegalCompressionException
389397 */
390398 public function save ($ file )
391399 {
@@ -465,9 +473,10 @@ protected function skipbytes($bytes)
465473 }
466474
467475 /**
468- * Write the given file metat data as header
476+ * Write the given file meta data as header
469477 *
470478 * @param FileInfo $fileinfo
479+ * @throws ArchiveIOException
471480 */
472481 protected function writeFileHeader (FileInfo $ fileinfo )
473482 {
@@ -486,12 +495,13 @@ protected function writeFileHeader(FileInfo $fileinfo)
486495 * Write a file header to the stream
487496 *
488497 * @param string $name
489- * @param int $uid
490- * @param int $gid
491- * @param int $perm
492- * @param int $size
493- * @param int $mtime
498+ * @param int $uid
499+ * @param int $gid
500+ * @param int $perm
501+ * @param int $size
502+ * @param int $mtime
494503 * @param string $typeflag Set to '5' for directories
504+ * @throws ArchiveIOException
495505 */
496506 protected function writeRawFileHeader ($ name , $ uid , $ gid , $ perm , $ size , $ mtime , $ typeflag = '' )
497507 {
@@ -678,4 +688,5 @@ public function filetype($file)
678688
679689 return Archive::COMPRESS_NONE ;
680690 }
691+
681692}
0 commit comments