From 3dd64c7ea1ccfe4146fdf0a979e6c0e87b4cdd50 Mon Sep 17 00:00:00 2001 From: David Maus <dmaus@dmaus.name> Date: Mon, 25 Nov 2019 18:14:10 +0100 Subject: [PATCH] Fix types --- src/HAB/Solr/Command/CommandInterface.php | 6 ++++-- src/HAB/Solr/Command/Invoker.php | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/HAB/Solr/Command/CommandInterface.php b/src/HAB/Solr/Command/CommandInterface.php index 1740aa0..fc1ad48 100644 --- a/src/HAB/Solr/Command/CommandInterface.php +++ b/src/HAB/Solr/Command/CommandInterface.php @@ -23,6 +23,8 @@ namespace HAB\Solr\Command; +use HAB\Solr\ParamBag; + /** * Interface of a Solr command. * @@ -42,7 +44,7 @@ interface CommandInterface /** * Return parameters. * - * @return array + * @return ParamBag */ public function getParameters (); @@ -61,4 +63,4 @@ interface CommandInterface */ public function getResult (); -} \ No newline at end of file +} diff --git a/src/HAB/Solr/Command/Invoker.php b/src/HAB/Solr/Command/Invoker.php index 2ccea57..2ee5775 100644 --- a/src/HAB/Solr/Command/Invoker.php +++ b/src/HAB/Solr/Command/Invoker.php @@ -103,7 +103,7 @@ class Invoker */ public function getParameters () { - if (is_null($this->parameters)) { + if ($this->parameters === null) { $this->setParameters(new ParamBag()); } return $this->parameters; @@ -113,7 +113,7 @@ class Invoker * Set parameters. * * @param ParamBag $parameters - * @return + * @return void */ public function setParameters (ParamBag $parameters) { @@ -131,4 +131,4 @@ class Invoker { return sprintf('%s=%s', urlencode($name), urlencode($value)); } -} \ No newline at end of file +} -- GitLab