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

azjezz / psl / 22520865518

28 Feb 2026 12:36PM UTC coverage: 97.768% (+0.2%) from 97.532%
22520865518

Pull #586

github

azjezz
more tests

Signed-off-by: azjezz <azjezz@protonmail.com>
Pull Request #586: add more tests

16 of 16 new or added lines in 4 files covered. (100.0%)

20 existing lines in 13 files now uncovered.

7492 of 7663 relevant lines covered (97.77%)

43.46 hits per line

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

0.0
/src/Psl/Html/Encoding.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Psl\Html;
6

7
use Psl\Default\DefaultInterface;
8

9
/**
10
 * Enumerates supported character encodings for HTML content.
11
 *
12
 * This enum defines a set of character encodings commonly used in the context of
13
 * HTML documents and web development. It includes various Unicode, Western European,
14
 * Cyrillic, Chinese, Japanese, and other character sets to support internationalization
15
 * and localization of web content.
16
 */
17
enum Encoding: string implements DefaultInterface
18
{
19
    /**
20
     * ASCII compatible multi-byte 8-bit Unicode.
21
     */
22
    case Utf8 = 'UTF-8';
23

24
    /**
25
     * Western European, Latin-1.
26
     */
27
    case Iso88591 = 'ISO-8859-1';
28

29
    /**
30
     * Western European, Latin-9.
31
     */
32
    case Iso885915 = 'ISO-8859-15';
33

34
    /**
35
     * Cyrillic charset (Latin/Cyrillic).
36
     */
37
    case Iso88595 = 'ISO-8859-5';
38

39
    /**
40
     * DOS-specific Cyrillic charset.
41
     */
42
    case Cp866 = 'cp866';
43

44
    /**
45
     * Windows-specific Cyrillic charset.
46
     */
47
    case Cp1251 = 'cp1251';
48

49
    /**
50
     * Windows specific charset for Western European.
51
     */
52
    case Cp1252 = 'cp1252';
53

54
    /**
55
     * Russian.
56
     */
57
    case Koi8R = 'KOI8-R';
58

59
    /**
60
     * Traditional Chinese.
61
     */
62
    case Big5 = 'BIG5';
63

64
    /**
65
     * Simplified Chinese, national standard character set.
66
     */
67
    case Gb2312 = 'GB2312';
68

69
    /**
70
     * Traditional Chinese ( Big5 with Hong Kong extensions ).
71
     */
72
    case Big5Hkscs = 'BIG5-HKSCS';
73

74
    /**
75
     * Japanese.
76
     */
77
    case ShiftJis = 'Shift_JIS';
78

79
    /**
80
     * Japanese.
81
     */
82
    case EucJp = 'EUC-JP';
83

84
    /**
85
     * Charset that was used by macOS.
86
     */
87
    case MacRoman = 'MacRoman';
88

89
    /**
90
     * Provides the default character encoding.
91
     *
92
     * UTF-8 is returned as the default encoding due to its comprehensive support for Unicode,
93
     * making it a versatile choice for web content that may include a wide variety of characters
94
     * from different languages. It is recommended for new web projects and content to ensure
95
     * maximum compatibility and inclusivity.
96
     *
97
     * @return static The UTF-8 encoding instance, representing the default encoding.
98
     */
99
    #[\Override]
100
    public static function default(): static
101
    {
UNCOV
102
        return self::Utf8;
×
103
    }
104
}
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

© 2026 Coveralls, Inc