Passed
Push — master ( 32dd3a...b6a4c4 )
by Caen
03:02 queued 12s
created

XML   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 1
c 2
b 0
f 0
dl 0
loc 5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A escape() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hyde\Support\Helpers;
6
7
use function htmlspecialchars;
8
9
/**
10
 * @internal This class is currently experimental and may change without notice.
11
 */
12
class XML
13
{
14
    public static function escape(string $string): string
15
    {
16
        return htmlspecialchars($string, ENT_XML1 | ENT_COMPAT, 'UTF-8');
17
    }
18
}
19