Code improvements (#1649)

* use global namespace for faster lookups
* phpstan level 5
This commit is contained in:
Kevin Papst
2020-04-19 14:37:14 +02:00
committed by GitHub
parent 7b25e9acaf
commit 0f3fa8fdbe
183 changed files with 604 additions and 574 deletions

View File

@@ -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