diff --git a/application/forms/DimensionsForm.php b/application/forms/DimensionsForm.php index fbfbbc7..731b696 100644 --- a/application/forms/DimensionsForm.php +++ b/application/forms/DimensionsForm.php @@ -79,7 +79,7 @@ public function assemble() $allDimensions = $this->cube->listAdditionalDimensions(); $this->addElement('select', 'addDimension', [ - 'options' => [null => $this->translate('+ Add a dimension')] + $allDimensions, + 'options' => ['' => $this->translate('+ Add a dimension')] + $allDimensions, 'class' => 'autosubmit' ]); } diff --git a/library/Cube/Cube.php b/library/Cube/Cube.php index 1e688f0..0c14b10 100644 --- a/library/Cube/Cube.php +++ b/library/Cube/Cube.php @@ -327,10 +327,10 @@ public function listColumns() /** * @param View $view - * @param CubeRenderer $renderer + * @param ?CubeRenderer $renderer * @return string */ - public function render(View $view, CubeRenderer $renderer = null) + public function render(View $view, ?CubeRenderer $renderer = null) { if ($renderer === null) { $renderer = $this->getRenderer(); diff --git a/library/Cube/Hook/IcingaDbActionsHook.php b/library/Cube/Hook/IcingaDbActionsHook.php index 63c24fe..ce12575 100644 --- a/library/Cube/Hook/IcingaDbActionsHook.php +++ b/library/Cube/Hook/IcingaDbActionsHook.php @@ -71,10 +71,10 @@ final protected function addActionLink(Url $url, string $title, string $descript * Helper method instantiating an Url object * * @param string $path - * @param array $params + * @param ?array $params * @return Url */ - final protected function makeUrl(string $path, array $params = null): Url + final protected function makeUrl(string $path, ?array $params = null): Url { $url = Url::fromPath($path); if ($params !== null) { diff --git a/library/Cube/Ido/DataView/Hoststatus.php b/library/Cube/Ido/DataView/Hoststatus.php index 32ee44b..b639495 100644 --- a/library/Cube/Ido/DataView/Hoststatus.php +++ b/library/Cube/Ido/DataView/Hoststatus.php @@ -9,7 +9,7 @@ class Hoststatus extends \Icinga\Module\Monitoring\DataView\Hoststatus { - public function __construct(ConnectionInterface $connection, array $columns = null) + public function __construct(ConnectionInterface $connection, ?array $columns = null) { $this->connection = $connection; $this->query = new HoststatusQuery($connection->getResource(), $columns);