Translit   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A transliterate() 0 9 1
1
<?php
2
3
/**
4
 * This file is part of the php-epp2 library.
5
 *
6
 * (c) Gunter Grodotzki <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE file
9
 * that was distributed with this source code.
10
 */
11
12
namespace AfriCC\EPP;
13
14
class Translit
15
{
16
    public static function transliterate($string)
17
    {
18
        // the reason for using this rather "exotic" function in contrary to
19
        // iconv is, that iconv is very unstable. It relies on the correct
20
        // linked library, which means it works different on OSX than on Linux
21
        // also iconv + setlocale is not thread safe, so if you are using IIS
22
        // php-fpm, fastcgi or similar it can/will break
23
        return transliterator_transliterate('Any-Latin; Latin-ASCII; [\u0100-\u7fff] remove', $string);
24
    }
25
}
26