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

Method buildLikePattern

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

Source from the content-addressed store, hash-verified

392 }
393
394 private function buildLikePattern(string $value): string
395 {
396 $escapedValue = $this->db->escapeLikeParameter($value);
397 if (strpbrk($value, '*?') !== false) {
398 return str_replace(['*', '?'], ['%', '_'], $escapedValue);
399 }
400
401 return '%' . $escapedValue . '%';
402 }
403
404 private function getAllowedFilterColumn(string $column): ?string
405 {

Callers 1

buildFilterExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected