These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace h4kuna\Upload; |
||
4 | |||
5 | class InvalidArgumentException extends \InvalidArgumentException {} |
||
6 | |||
7 | class InvalidStateException extends \RuntimeException {} |
||
0 ignored issues
–
show
|
|||
8 | |||
9 | // download |
||
10 | abstract class DownloadException extends \Exception {} |
||
11 | |||
12 | class FileDownloadFailedException extends DownloadException {} |
||
13 | |||
14 | // upload |
||
15 | abstract class UploadException extends \Exception {} |
||
16 | |||
17 | class FileUploadFailedException extends UploadException {} |
||
18 | |||
19 | class UnSupportedFileTypeException extends UploadException {} |
Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.