Code improvements (#1649)
* use global namespace for faster lookups * phpstan level 5
This commit is contained in:
@@ -38,7 +38,7 @@ final class SearchTerm
|
||||
|
||||
foreach ($terms as $term) {
|
||||
$tmp = explode(':', $term);
|
||||
if (count($tmp) === 2) {
|
||||
if (\count($tmp) === 2) {
|
||||
$fields[$tmp[0]] = $tmp[1];
|
||||
} else {
|
||||
$finalTerm[] = $term;
|
||||
@@ -51,7 +51,7 @@ final class SearchTerm
|
||||
|
||||
public function hasSearchField(string $name): bool
|
||||
{
|
||||
return array_key_exists($name, $this->fields);
|
||||
return \array_key_exists($name, $this->fields);
|
||||
}
|
||||
|
||||
public function getSearchField(string $name): ?string
|
||||
|
||||
Reference in New Issue
Block a user