|
16 | 16 |
|
17 | 17 | class ImageException extends FrameworkException implements ExceptionInterface |
18 | 18 | { |
19 | | - public static function forMissingImage(): ImageException |
| 19 | + public static function forMissingImage(): self |
20 | 20 | { |
21 | 21 | return new static(lang('Images.sourceImageRequired')); |
22 | 22 | } |
23 | 23 |
|
24 | | - public static function forFileNotSupported(): ImageException |
| 24 | + public static function forFileNotSupported(): self |
25 | 25 | { |
26 | 26 | return new static(lang('Images.fileNotSupported')); |
27 | 27 | } |
28 | 28 |
|
29 | | - public static function forMissingAngle(): ImageException |
| 29 | + public static function forMissingAngle(): self |
30 | 30 | { |
31 | 31 | return new static(lang('Images.rotationAngleRequired')); |
32 | 32 | } |
33 | 33 |
|
34 | | - public static function forInvalidDirection(?string $dir = null): ImageException |
| 34 | + public static function forInvalidDirection(?string $dir = null): self |
35 | 35 | { |
36 | 36 | return new static(lang('Images.invalidDirection', [$dir])); |
37 | 37 | } |
38 | 38 |
|
39 | | - public static function forInvalidPath(): ImageException |
| 39 | + public static function forInvalidPath(): self |
40 | 40 | { |
41 | 41 | return new static(lang('Images.invalidPath')); |
42 | 42 | } |
43 | 43 |
|
44 | | - public static function forEXIFUnsupported(): ImageException |
| 44 | + public static function forEXIFUnsupported(): self |
45 | 45 | { |
46 | 46 | return new static(lang('Images.exifNotSupported')); |
47 | 47 | } |
48 | 48 |
|
49 | | - public static function forInvalidImageCreate(?string $extra = null): ImageException |
| 49 | + public static function forInvalidImageCreate(?string $extra = null): self |
50 | 50 | { |
51 | 51 | return new static(lang('Images.unsupportedImageCreate') . ' ' . $extra); |
52 | 52 | } |
53 | 53 |
|
54 | | - public static function forSaveFailed(): ImageException |
| 54 | + public static function forSaveFailed(): self |
55 | 55 | { |
56 | 56 | return new static(lang('Images.saveFailed')); |
57 | 57 | } |
58 | 58 |
|
59 | | - public static function forInvalidImageLibraryPath(?string $path = null): ImageException |
| 59 | + public static function forInvalidImageLibraryPath(?string $path = null): self |
60 | 60 | { |
61 | 61 | return new static(lang('Images.libPathInvalid', [$path])); |
62 | 62 | } |
63 | 63 |
|
64 | | - public static function forImageProcessFailed(): ImageException |
| 64 | + public static function forImageProcessFailed(): self |
65 | 65 | { |
66 | 66 | return new static(lang('Images.imageProcessFailed')); |
67 | 67 | } |
|
0 commit comments