Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
LikeUtils | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
__construct | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
toLikeString | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\DoctrineEntityDatalayer; |
3 | |
4 | final class LikeUtils |
5 | { |
6 | /** |
7 | * @codeCoverageIgnore |
8 | */ |
9 | private function __construct() |
10 | { |
11 | } |
12 | |
13 | public static function toLikeString(string $input): string |
14 | { |
15 | return '%' . str_replace(['%', '_', '\\'], ['\\%', '\\_', '\\\\'], $input) . '%'; |
16 | } |
17 | } |