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

codeigniter4 / CodeIgniter4 / 38229186212

12 Oct 2026 09:19AM UTC coverage: 87.895% (-2.3%) from 90.179%
38229186212

Pull #10624

github

web-flow
Merge 138c083b8 into 0361d9211
Pull Request #10624: refactor: replace `@see` test annotations in source with `#[CoversClass]` in tests

22284 of 25353 relevant lines covered (87.89%)

122.76 hits per line

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

16.67
/system/Encryption/Exceptions/EncryptionException.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\Encryption\Exceptions;
15

16
use CodeIgniter\Exceptions\DebugTraceableTrait;
17
use CodeIgniter\Exceptions\RuntimeException;
18

19
/**
20
 * Encryption exception
21
 */
22
class EncryptionException extends RuntimeException
23
{
24
    use DebugTraceableTrait;
25

26
    /**
27
     * Thrown when no driver is present in the active encryption session.
28
     *
29
     * @return static
30
     */
31
    public static function forNoDriverRequested()
32
    {
33
        return new static(lang('Encryption.noDriverRequested'));
×
34
    }
35

36
    /**
37
     * Thrown when the handler requested is not available.
38
     *
39
     * @return static
40
     */
41
    public static function forNoHandlerAvailable(string $handler)
42
    {
43
        return new static(lang('Encryption.noHandlerAvailable', [$handler]));
×
44
    }
45

46
    /**
47
     * Thrown when the handler requested is unknown.
48
     *
49
     * @return static
50
     */
51
    public static function forUnKnownHandler(?string $driver = null)
52
    {
53
        return new static(lang('Encryption.unKnownHandler', [$driver]));
×
54
    }
55

56
    /**
57
     * Thrown when no starter key is provided for the current encryption session.
58
     *
59
     * @return static
60
     */
61
    public static function forNeedsStarterKey()
62
    {
63
        return new static(lang('Encryption.starterKeyNeeded'));
×
64
    }
65

66
    /**
67
     * Thrown during data decryption when a problem or error occurred.
68
     *
69
     * @return static
70
     */
71
    public static function forAuthenticationFailed()
72
    {
73
        return new static(lang('Encryption.authenticationFailed'));
8 ✔
74
    }
75

76
    /**
77
     * Thrown during data encryption when a problem or error occurred.
78
     *
79
     * @return static
80
     */
81
    public static function forEncryptionFailed()
82
    {
83
        return new static(lang('Encryption.encryptionFailed'));
×
84
    }
85
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc