Lines 0.00% 0 / 11
Functions and Methods 0.00% 0 / 1
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
Sorter 0.00% 0 / 11 0.00% 0 / 1 2 0.00% 0 / 1
 toSortableString 0.00% 0 / 11 0.00% 0 / 1 2
1<?php
2
3namespace BO\Zmsdldb\Helper;
4
5/**
6 * Special sort algorithm for DLDB
7 */
8class Sorter
9{
10    /**
11     * @todo check against ISO definition
12     */
13    public static function toSortableString(mixed $string): string
14    {
15        $string = strtr($string, array(
16            'Ä' => 'Ae',
17            'Ö' => 'Oe',
18            'Ü' => 'Ue',
19            'ä' => 'ae',
20            'ö' => 'oe',
21            'ü' => 'ue',
22            'ß' => 'ss',
23            '€' => 'E',
24        ));
25        return strtolower($string);
26    }
27}