diff options
author | Simon Rettberg | 2022-04-07 12:14:29 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-04-07 12:14:29 +0200 |
commit | b09a94e3c8b527a0073cd6b8a158ff134cacd15e (patch) | |
tree | 0334f52d5139e3f38ec2cfa94d8b152cbd81ad7f /modules-available/statistics/inc/statisticsfilterset.inc.php | |
parent | [statistics] Make hidden pci device ids clickable too (diff) | |
download | slx-admin-b09a94e3c8b527a0073cd6b8a158ff134cacd15e.tar.gz slx-admin-b09a94e3c8b527a0073cd6b8a158ff134cacd15e.tar.xz slx-admin-b09a94e3c8b527a0073cd6b8a158ff134cacd15e.zip |
[statistics] Add type annotations and a couple comments
Diffstat (limited to 'modules-available/statistics/inc/statisticsfilterset.inc.php')
-rw-r--r-- | modules-available/statistics/inc/statisticsfilterset.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/statistics/inc/statisticsfilterset.inc.php b/modules-available/statistics/inc/statisticsfilterset.inc.php index a38f9d3f..e4117a8c 100644 --- a/modules-available/statistics/inc/statisticsfilterset.inc.php +++ b/modules-available/statistics/inc/statisticsfilterset.inc.php @@ -38,7 +38,7 @@ class StatisticsFilterSet $this->cache = compact('where', 'join', 'args'); } - public function isNoId44Filter() + public function isNoId44Filter(): bool { $filter = $this->hasFilter('Id44GbStatisticsFilter'); return $filter !== false && $filter->argument == 0; @@ -57,7 +57,7 @@ class StatisticsFilterSet * @param string $type filter type (class name) * @return false|DatabaseFilter The filter, false if not found */ - public function hasFilter($type) + public function hasFilter(string $type) { foreach ($this->filters as $filter) { if ($filter->isClass($type)) { @@ -71,7 +71,7 @@ class StatisticsFilterSet * @param string $type filter type key/id * @return false|DatabaseFilter The filter, false if not found */ - public function hasFilterKey($type) + public function hasFilterKey(string $type) { if (isset($this->filters[$type])) return $this->filters[$type]; @@ -85,7 +85,7 @@ class StatisticsFilterSet * @param string $permission permission to use * @return bool false if no permission for any location, true otherwise */ - public function setAllowedLocationsFromPermission($permission) + public function setAllowedLocationsFromPermission(string $permission): bool { if (!Module::isAvailable('locations')) return true; |