Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| RemoveSpaces | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| sanitize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Sanitizers; |
| 4 | |
| 5 | use ArondeParon\RequestSanitizer\Contracts\Sanitizer; |
| 6 | |
| 7 | class RemoveSpaces implements Sanitizer |
| 8 | { |
| 9 | /** |
| 10 | * @param mixed $input |
| 11 | * @return string |
| 12 | */ |
| 13 | public function sanitize($input): string |
| 14 | { |
| 15 | return preg_replace('~\s{1,}~', '', $input); |
| 16 | } |
| 17 | } |