MCPcopy Create free account
hub / github.com/Rello/analytics / buildLikePattern

Method buildLikePattern

lib/Db/StorageMapper.php:425–433  ·  view source on GitHub ↗
(string $value)

Source from the content-addressed store, hash-verified

423 }
424
425 private function buildLikePattern(string $value): string
426 {
427 $escapedValue = $this->db->escapeLikeParameter($value);
428 if (strpbrk($value, '*?') !== false) {
429 return str_replace(['*', '?'], ['%', '_'], $escapedValue);
430 }
431
432 return '%' . $escapedValue . '%';
433 }
434
435 private function getAllowedFilterColumn(string $column): ?string
436 {

Callers 1

buildFilterExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected