Apply fixes from StyleCI

[ci skip] [skip ci]
This commit is contained in:
DariusIII
2018-02-06 14:50:52 +00:00
committed by StyleCI Bot
parent e2de07d3b6
commit 2c88ed1908
+2 -2
View File
@@ -83,7 +83,7 @@ class SphinxSearch
}
/**
* Escapes characters that are treated as special operators by the query language parser
* Escapes characters that are treated as special operators by the query language parser.
*
* @param string $string unescaped string
*
@@ -92,7 +92,7 @@ class SphinxSearch
public function escapeString($string): string
{
$from = ['\\', '(', ')', '|', '-', '!', '@', '~', '"', '&', '/', '^', '$', '='];
$to = ['\\\\', '\(', '\)', '\|', '\-', '\!', '\@', '\~', '\"', '\&', '\/', '\^', '\$', '\='];
$to = ['\\\\', '\(', '\)', '\|', '\-', '\!', '\@', '\~', '\"', '\&', '\/', '\^', '\$', '\='];
return str_replace($from, $to, $string);
}