Completed
Push — master ( 435061...8e7c43 )
by Ronan
01:16
created

Utils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A unDecorate() 0 10 2
1
<?php
2
3
namespace IsoCodes;
4
5
/**
6
 * Utils
7
 */
8
class Utils
9
{
10
    /**
11
     * @param string $input
12
     * @param array  $hyphens
13
     *
14
     * @return string
15
     */
16
    public static function unDecorate($input, $hyphens = [])
17
    {
18
        $hyphensLength = count($hyphens);
19
        // removing hyphens
20
        for ($i = 0; $i < $hyphensLength; ++$i) {
21
            $input = str_replace($hyphens[$i], '', $input);
22
        }
23
24
        return $input;
25
    }
26
}
27