CleanHelper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A clean() 0 5 1
1
<?php
2
3
namespace Padosoft\TesseraSanitaria;
4
5
/**
6
 * Class CleanHelper
7
 * @package Padosoft\TesseraSanitaria
8
 */
9
class CleanHelper
10
{
11
    /**
12
     * CleanHelper constructor.
13
     */
14
    public function __construct()
15
    {
16
    }
17
18
    /**
19
     * @param $value
20
     *
21
     * @return mixed
22
     */
23
    public function clean($value)
24
    {
25
        $value = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', trim(html_entity_decode($value)));
26
        return $value;
27
    }
28
}
29
30