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