|
16 | 16 |
|
17 | 17 | class ImageException extends FrameworkException implements ExceptionInterface
|
18 | 18 | {
|
19 |
| - public static function forMissingImage(): self |
| 19 | + /** |
| 20 | + * Thrown when the image is not found. |
| 21 | + * |
| 22 | + * @return static |
| 23 | + */ |
| 24 | + public static function forMissingImage() |
20 | 25 | {
|
21 | 26 | return new static(lang('Images.sourceImageRequired'));
|
22 | 27 | }
|
23 | 28 |
|
24 |
| - public static function forFileNotSupported(): self |
| 29 | + /** |
| 30 | + * Thrown when the file specific is not following the role. |
| 31 | + * |
| 32 | + * @return static |
| 33 | + */ |
| 34 | + public static function forFileNotSupported() |
25 | 35 | {
|
26 | 36 | return new static(lang('Images.fileNotSupported'));
|
27 | 37 | }
|
28 | 38 |
|
29 |
| - public static function forMissingAngle(): self |
| 39 | + /** |
| 40 | + * Thrown when the angle is undefined. |
| 41 | + * |
| 42 | + * @return static |
| 43 | + */ |
| 44 | + public static function forMissingAngle() |
30 | 45 | {
|
31 | 46 | return new static(lang('Images.rotationAngleRequired'));
|
32 | 47 | }
|
33 | 48 |
|
34 |
| - public static function forInvalidDirection(?string $dir = null): self |
| 49 | + /** |
| 50 | + * Thrown when the direction property is invalid. |
| 51 | + * |
| 52 | + * @return static |
| 53 | + */ |
| 54 | + public static function forInvalidDirection(?string $dir = null) |
35 | 55 | {
|
36 | 56 | return new static(lang('Images.invalidDirection', [$dir]));
|
37 | 57 | }
|
38 | 58 |
|
39 |
| - public static function forInvalidPath(): self |
| 59 | + /** |
| 60 | + * Thrown when the path property is invalid. |
| 61 | + * |
| 62 | + * @return static |
| 63 | + */ |
| 64 | + public static function forInvalidPath() |
40 | 65 | {
|
41 | 66 | return new static(lang('Images.invalidPath'));
|
42 | 67 | }
|
43 | 68 |
|
44 |
| - public static function forEXIFUnsupported(): self |
| 69 | + /** |
| 70 | + * Thrown when the EXIF function is not supported. |
| 71 | + * |
| 72 | + * @return static |
| 73 | + */ |
| 74 | + public static function forEXIFUnsupported() |
45 | 75 | {
|
46 | 76 | return new static(lang('Images.exifNotSupported'));
|
47 | 77 | }
|
48 | 78 |
|
49 |
| - public static function forInvalidImageCreate(?string $extra = null): self |
| 79 | + /** |
| 80 | + * Thrown when the image specific is invalid. |
| 81 | + * |
| 82 | + * @return static |
| 83 | + */ |
| 84 | + public static function forInvalidImageCreate(?string $extra = null) |
50 | 85 | {
|
51 | 86 | return new static(lang('Images.unsupportedImageCreate') . ' ' . $extra);
|
52 | 87 | }
|
53 | 88 |
|
54 |
| - public static function forSaveFailed(): self |
| 89 | + /** |
| 90 | + * Thrown when the image save failed. |
| 91 | + * |
| 92 | + * @return static |
| 93 | + */ |
| 94 | + public static function forSaveFailed() |
55 | 95 | {
|
56 | 96 | return new static(lang('Images.saveFailed'));
|
57 | 97 | }
|
58 | 98 |
|
59 |
| - public static function forInvalidImageLibraryPath(?string $path = null): self |
| 99 | + /** |
| 100 | + * Thrown when the image library path is invalid. |
| 101 | + * |
| 102 | + * @return static |
| 103 | + */ |
| 104 | + public static function forInvalidImageLibraryPath(?string $path = null) |
60 | 105 | {
|
61 | 106 | return new static(lang('Images.libPathInvalid', [$path]));
|
62 | 107 | }
|
63 | 108 |
|
64 |
| - public static function forImageProcessFailed(): self |
| 109 | + /** |
| 110 | + * Thrown when the image process failed. |
| 111 | + * |
| 112 | + * @return static |
| 113 | + */ |
| 114 | + public static function forImageProcessFailed() |
65 | 115 | {
|
66 | 116 | return new static(lang('Images.imageProcessFailed'));
|
67 | 117 | }
|
|
0 commit comments