diff --git a/library/Graphite/Graphing/MetricsQuery.php b/library/Graphite/Graphing/MetricsQuery.php index 93d0c90..6ad9550 100644 --- a/library/Graphite/Graphing/MetricsQuery.php +++ b/library/Graphite/Graphing/MetricsQuery.php @@ -62,7 +62,7 @@ class MetricsQuery implements Queryable, Filterable, Fetchable $this->dataSource = $dataSource; } - public function from($target, array $fields = null) + public function from($target, ?array $fields = null) { if ($fields !== null) { throw new InvalidArgumentException('Fields are not applicable to this kind of query'); diff --git a/library/Graphite/Util/TimeRangePickerTools.php b/library/Graphite/Util/TimeRangePickerTools.php index d1ebc75..1248dfe 100644 --- a/library/Graphite/Util/TimeRangePickerTools.php +++ b/library/Graphite/Util/TimeRangePickerTools.php @@ -41,7 +41,7 @@ final class TimeRangePickerTools * * @return UrlParams The copy */ - public static function copyAllRangeParameters(UrlParams $copy = null, UrlParams $origin = null) + public static function copyAllRangeParameters(?UrlParams $copy = null, ?UrlParams $origin = null) { if ($origin === null) { $origin = Url::fromRequest()->getParams(); diff --git a/library/Graphite/Web/Controller/TimeRangePickerTrait.php b/library/Graphite/Web/Controller/TimeRangePickerTrait.php index 7352b1b..3bd7430 100644 --- a/library/Graphite/Web/Controller/TimeRangePickerTrait.php +++ b/library/Graphite/Web/Controller/TimeRangePickerTrait.php @@ -23,11 +23,11 @@ trait TimeRangePickerTrait /** * Process the given request using the forms * - * @param Request $request The request to be processed + * @param ?Request $request The request to be processed * * @return Request The request supposed to be processed */ - protected function handleTimeRangePickerRequest(Request $request = null) + protected function handleTimeRangePickerRequest(?Request $request = null) { $this->getTimeRangePickerCommonForm()->handleRequest($request); return $this->getTimeRangePickerCustomForm()->handleRequest($request); diff --git a/library/Graphite/Web/Widget/Graphs.php b/library/Graphite/Web/Widget/Graphs.php index e49a0eb..ce26ad8 100644 --- a/library/Graphite/Web/Widget/Graphs.php +++ b/library/Graphite/Web/Widget/Graphs.php @@ -204,11 +204,11 @@ abstract class Graphs extends AbstractWidget /** * Process the given request using this widget * - * @param Request $request The request to be processed + * @param ?Request $request The request to be processed * * @return $this */ - public function handleRequest(Request $request = null) + public function handleRequest(?Request $request = null) { if ($request === null) { $request = Icinga::app()->getRequest();