mirror of
https://github.com/Icinga/icingaweb2-module-graphite.git
synced 2026-02-03 20:40:06 -05:00
PHP 8.4: Change implicit nullable type declaration to explicit
Since PHP 8.4 implicitly nullable parameter types are deprecated.
This commit is contained in:
parent
e4ce6a009d
commit
c2b0ed94c9
4 changed files with 6 additions and 6 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue