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

Method buildLikePattern

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

Source from the content-addressed store, hash-verified

411 }
412
413 private function buildLikePattern(string $value): string
414 {
415 $escapedValue = $this->db->escapeLikeParameter($value);
416 if (strpbrk($value, '*?') !== false) {
417 return str_replace(['*', '?'], ['%', '_'], $escapedValue);
418 }
419
420 return '%' . $escapedValue . '%';
421 }
422
423 private function getAllowedFilterColumn(string $column): ?string
424 {

Callers 1

buildFilterExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected