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

codeigniter4 / CodeIgniter4 / 12739860967

13 Jan 2025 03:03AM UTC coverage: 84.454%. Remained the same
12739860967

push

github

web-flow
chore: add more trailing commas in more places (#9395)

* Apply to parameters

* Apply to array destructuring

* Apply to match

* Apply for arguments

337 of 397 new or added lines in 117 files covered. (84.89%)

1 existing line in 1 file now uncovered.

20464 of 24231 relevant lines covered (84.45%)

189.67 hits per line

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

30.77
/system/Exceptions/FrameworkException.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\Exceptions;
15

16
use RuntimeException;
17

18
/**
19
 * Class FrameworkException
20
 *
21
 * A collection of exceptions thrown by the framework
22
 * that can only be determined at run time.
23
 */
24
class FrameworkException extends RuntimeException implements ExceptionInterface
25
{
26
    use DebugTraceableTrait;
27

28
    /**
29
     * @return static
30
     */
31
    public static function forEnabledZlibOutputCompression()
32
    {
33
        return new static(lang('Core.enabledZlibOutputCompression'));
×
34
    }
35

36
    /**
37
     * @return static
38
     */
39
    public static function forInvalidFile(string $path)
40
    {
41
        return new static(lang('Core.invalidFile', [$path]));
3✔
42
    }
43

44
    /**
45
     * @return static
46
     */
47
    public static function forInvalidDirectory(string $path)
48
    {
49
        return new static(lang('Core.invalidDirectory', [$path]));
1✔
50
    }
51

52
    /**
53
     * @return static
54
     */
55
    public static function forCopyError(string $path)
56
    {
57
        return new static(lang('Core.copyError', [$path]));
×
58
    }
59

60
    /**
61
     * @return static
62
     *
63
     * @deprecated 4.5.0 No longer used.
64
     */
65
    public static function forMissingExtension(string $extension)
66
    {
67
        if (str_contains($extension, 'intl')) {
×
68
            // @codeCoverageIgnoreStart
69
            $message = sprintf(
×
70
                'The framework needs the following extension(s) installed and loaded: %s.',
×
NEW
71
                $extension,
×
72
            );
×
73
            // @codeCoverageIgnoreEnd
74
        } else {
75
            $message = lang('Core.missingExtension', [$extension]);
×
76
        }
77

78
        return new static($message);
×
79
    }
80

81
    /**
82
     * @return static
83
     */
84
    public static function forNoHandlers(string $class)
85
    {
86
        return new static(lang('Core.noHandlers', [$class]));
1✔
87
    }
88

89
    /**
90
     * @return static
91
     */
92
    public static function forFabricatorCreateFailed(string $table, string $reason)
93
    {
94
        return new static(lang('Fabricator.createFailed', [$table, $reason]));
1✔
95
    }
96
}
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