Str   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 8
Bugs 0 Features 1
Metric Value
wmc 1
c 8
b 0
f 1
lcom 0
cbo 0
dl 0
loc 18
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A clean() 0 9 1
1
<?php
2
3
namespace Felix\Scraper;
4
5
class Str
6
{
7
    /**
8
     * Limpiar la cadena y almacenar.
9
     *
10
     * @param $str string Cadena de caracteres a limpiar.
11
     * @return string
12
     */
13 1
    public static function clean($str)
14
    {
15 1
        $str = html_entity_decode($str);
16 1
        $str = str_replace("\xc2\xa0", "", $str);
17 1
        $str = trim($str);
18 1
        $str = preg_replace("!\s+!", " ", $str);
19
        
20 1
        return $str;
21
    }
22
}
23