33use io \streams \{InputStream , Seekable };
44use lang \FormatException ;
55
6- /**
7- * Zip archive reader that works on Seekable input streams.
8- *
9- */
6+ /** Zip archive reader that works on Seekable input streams. */
107class RandomAccessZipReaderImpl extends AbstractZipReaderImpl {
118
129 /**
1310 * Creation constructor
1411 *
15- * @param io.streams.InputStream stream
12+ * @param io.streams.InputStream $ stream
1613 */
1714 public function __construct (InputStream $ stream ) {
1815 parent ::__construct (cast ($ stream , 'io.streams.Seekable ' ));
@@ -21,7 +18,7 @@ public function __construct(InputStream $stream) {
2118 /**
2219 * Get first entry
2320 *
24- * @return io.archive.zip.ZipEntry
21+ * @return io.archive.zip.ZipEntry
2522 */
2623 public function firstEntry () {
2724 $ this ->streamPosition (0 );
@@ -31,7 +28,7 @@ public function firstEntry() {
3128 /**
3229 * Get next entry
3330 *
34- * @return io.archive.zip.ZipEntry
31+ * @return io.archive.zip.ZipEntry
3532 */
3633 public function nextEntry () {
3734 $ this ->skip && $ this ->streamPosition ($ this ->position + $ this ->skip );
@@ -41,8 +38,8 @@ public function nextEntry() {
4138 /**
4239 * Seeks a stream
4340 *
44- * @param int offset absolute offset
45- * @param int whence
41+ * @param int $ offset absolute offset
42+ * @param int $ whence
4643 */
4744 protected function streamSeek ($ offset , $ whence ) {
4845 $ this ->stream ->seek ($ offset , $ whence );
@@ -51,6 +48,7 @@ protected function streamSeek($offset, $whence) {
5148 /**
5249 * Read central directory
5350 *
51+ * @return void
5452 */
5553 protected function readCentralDirectory () {
5654 $ entries = $ this ->seekCentralDirectory ();
@@ -102,7 +100,7 @@ protected function seekCentralDirectory() {
102100 $ marker = substr ($ marker , -3 );
103101 }
104102
105- if (0 == $ this ->streamAvailable ()) {
103+ if (0 === $ this ->streamAvailable ()) {
106104 throw new FormatException ('Could not find central directory; currently not supporting archives w/ file comments. ' );
107105 }
108106
0 commit comments