Test Failed
Push — master ( 13d95e...c6c6a6 )
by Ricardo
02:22
created

Cpf::toDatabase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Validate;
4
5
use Validate\Traits\FakeNameTrait;
6
7
class Cpf implements \Validate\Contracts\Validate
8
{
9
    use FakeNameTrait;
10
11
    public static function toDatabase($cpf)
12
    {
13
        return preg_replace('/[^0-9]/', '', $cpf);
14
    }
15
    
16
    public static function toUser($cpf)
17
    {
18
        return $cpf;
19
    }
20
21
    public static function validate($cpf)
22
    {
23
24
        return true;
25
    }
26
27
}
28