| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Number implements \Validate\Contracts\Validate |
||
| 8 | { |
||
| 9 | use FakeNameTrait; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Remove Virgulas do Numeral e Add . |
||
| 13 | */ |
||
| 14 | public static function toDatabase(string $number) |
||
| 15 | { |
||
| 16 | if(strpos($number, ',') > 0) { |
||
| 17 | $number = str_replace('.', '', $number); |
||
| 18 | $number = str_replace(',', '.', $number); |
||
| 19 | } |
||
| 20 | return $number; |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function toUser($number) |
||
| 26 | } |
||
| 27 | |||
| 28 | public static function validate($number) |
||
| 31 | } |
||
| 32 | |||
| 33 | public static function isSame(string $to, string $from) |
||
| 39 |