• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeigniter4 / CodeIgniter4 / 12674098130

08 Jan 2025 03:49PM UTC coverage: 84.455% (+0.001%) from 84.454%
12674098130

Pull #9383

github

web-flow
Merge 5493fda72 into e475fd8fa
Pull Request #9383: refactor: Fix phpstan isset offset

1 of 1 new or added line in 1 file covered. (100.0%)

718 existing lines in 53 files now uncovered.

20699 of 24509 relevant lines covered (84.45%)

190.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/system/Images/Exceptions/ImageException.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of CodeIgniter 4 framework.
7
 *
8
 * (c) CodeIgniter Foundation <admin@codeigniter.com>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace CodeIgniter\Images\Exceptions;
15

16
use CodeIgniter\Exceptions\FrameworkException;
17

18
class ImageException extends FrameworkException
19
{
20
    /**
21
     * Thrown when the image is not found.
22
     *
23
     * @return static
24
     */
25
    public static function forMissingImage()
26
    {
27
        return new static(lang('Images.sourceImageRequired'));
1✔
28
    }
29

30
    /**
31
     * Thrown when the file specific is not following the role.
32
     *
33
     * @return static
34
     */
35
    public static function forFileNotSupported()
36
    {
37
        return new static(lang('Images.fileNotSupported'));
1✔
38
    }
39

40
    /**
41
     * Thrown when the angle is undefined.
42
     *
43
     * @return static
44
     */
45
    public static function forMissingAngle()
46
    {
47
        return new static(lang('Images.rotationAngleRequired'));
2✔
48
    }
49

50
    /**
51
     * Thrown when the direction property is invalid.
52
     *
53
     * @return static
54
     */
55
    public static function forInvalidDirection(?string $dir = null)
56
    {
57
        return new static(lang('Images.invalidDirection', [$dir]));
2✔
58
    }
59

60
    /**
61
     * Thrown when the path property is invalid.
62
     *
63
     * @return static
64
     */
65
    public static function forInvalidPath()
66
    {
UNCOV
67
        return new static(lang('Images.invalidPath'));
×
68
    }
69

70
    /**
71
     * Thrown when the EXIF function is not supported.
72
     *
73
     * @return static
74
     */
75
    public static function forEXIFUnsupported()
76
    {
UNCOV
77
        return new static(lang('Images.exifNotSupported'));
×
78
    }
79

80
    /**
81
     * Thrown when the image specific is invalid.
82
     *
83
     * @return static
84
     */
85
    public static function forInvalidImageCreate(?string $extra = null)
86
    {
UNCOV
87
        return new static(lang('Images.unsupportedImageCreate') . ' ' . $extra);
×
88
    }
89

90
    /**
91
     * Thrown when the image save failed.
92
     *
93
     * @return static
94
     */
95
    public static function forSaveFailed()
96
    {
UNCOV
97
        return new static(lang('Images.saveFailed'));
×
98
    }
99

100
    /**
101
     * Thrown when the image library path is invalid.
102
     *
103
     * @return static
104
     */
105
    public static function forInvalidImageLibraryPath(?string $path = null)
106
    {
107
        return new static(lang('Images.libPathInvalid', [$path]));
3✔
108
    }
109

110
    /**
111
     * Thrown when the image process failed.
112
     *
113
     * @return static
114
     */
115
    public static function forImageProcessFailed()
116
    {
UNCOV
117
        return new static(lang('Images.imageProcessFailed'));
×
118
    }
119
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc