Converts 'strpos()' calls to improve code readability.

Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
This commit is contained in:
Faraz Samapoor
2023-05-07 09:30:01 +03:30
parent ff234f68e1
commit b8566a3a0d
8 changed files with 15 additions and 15 deletions

View File

@@ -41,7 +41,7 @@ class FilterStringParser {
public function __construct(IL10N $l10n) {
$this->l10n = $l10n;
}
public function parse(?string $filter): SearchQuery {
$query = new SearchQuery();
if (empty($filter)) {
@@ -71,7 +71,7 @@ class FilterStringParser {
}
private function parseFilterToken(SearchQuery $query, string $token): bool {
if (strpos($token, ':') === false) {
if (!str_contains($token, ':')) {
return false;
}