Passed
Push — master ( de4ed9...5f6eee )
by Petr
10:41
created

TNullBytes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 9
rs 10
ccs 2
cts 2
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A removeNullBytes() 0 3 1
1
<?php
2
3
namespace kalanis\kw_input\Traits;
4
5
6
/**
7
 * Trait TNullBytes
8
 * @package kalanis\kw_input\Traits
9
 * Remove null bytes from string
10
 */
11
trait TNullBytes
12
{
13
    /**
14
     * @param string $string
15
     * @return string
16
     */
17 20
    public function removeNullBytes($string)
18
    {
19 20
        return str_replace(chr(0), '', $string);
20
    }
21
}
22