Skip to content

Commit cabfd12

Browse files
committed
extracted exceptions into their own files
required for PSR-2
1 parent 0feb2c8 commit cabfd12

File tree

6 files changed

+40
-15
lines changed

6 files changed

+40
-15
lines changed

src/Archive.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,3 @@ public function setCallback($callback)
133133
$this->callback = $callback;
134134
}
135135
}
136-
137-
class ArchiveIOException extends \Exception
138-
{
139-
}
140-
141-
class ArchiveIllegalCompressionException extends \Exception
142-
{
143-
}
144-
145-
class ArchiveCorruptedException extends \Exception
146-
{
147-
}

src/ArchiveCorruptedException.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace splitbrain\PHPArchive;
4+
5+
/**
6+
* The archive is unreadable
7+
*/
8+
class ArchiveCorruptedException extends \Exception
9+
{
10+
}

src/ArchiveIOException.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace splitbrain\PHPArchive;
4+
5+
/**
6+
* Read/Write Errors
7+
*/
8+
class ArchiveIOException extends \Exception
9+
{
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace splitbrain\PHPArchive;
4+
5+
/**
6+
* Bad or unsupported compression settings requested
7+
*/
8+
class ArchiveIllegalCompressionException extends \Exception
9+
{
10+
}

src/FileInfo.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,3 @@ public function match($include = '', $exclude = '')
338338
}
339339
}
340340

341-
class FileInfoException extends \Exception
342-
{
343-
}

src/FileInfoException.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace splitbrain\PHPArchive;
4+
5+
/**
6+
* File meta data problems
7+
*/
8+
class FileInfoException extends \Exception
9+
{
10+
}

0 commit comments

Comments
 (0)