diff --git a/BaseHandler.php b/BaseHandler.php index ad04ea30c169afea2c82ba8e7383dbff8ff9327c..f3f92df29a297e1939d133b011083945fcce642c 100644 --- a/BaseHandler.php +++ b/BaseHandler.php @@ -117,7 +117,7 @@ abstract class BaseHandler implements BaseHandlerInterface { /** * {@inheritdoc} */ - public function setEvent(Event $event): self { + public function setEvent(Event $event): BaseHandlerInterface { $this->event = $event; return $this; } @@ -125,7 +125,7 @@ abstract class BaseHandler implements BaseHandlerInterface { /** * {@inheritdoc} */ - public function setInput(InputInterface $input): BaseHandler { + public function setInput(InputInterface $input): BaseHandlerInterface { $this->consoleInput = $input; return $this; } diff --git a/BaseHandlerInterface.php b/BaseHandlerInterface.php index d6368b4f884969c5ef3238d3581b6f404e20bf74..347d08ec8623549efc5b8ef121e5c2671e0fe46a 100644 --- a/BaseHandlerInterface.php +++ b/BaseHandlerInterface.php @@ -26,16 +26,22 @@ interface BaseHandlerInterface { * * @param \Composer\Script\Event $event * The composer event. + * + * @return self + * This hanlder. */ - public function setEvent(Event $event); + public function setEvent(Event $event): BaseHandlerInterface; /** * Sets the input handler. * * @param \Symfony\Component\Console\Input\InputInterface $input * The input handler. + * + * @return self + * This hanlder. */ - public function setInput(InputInterface $input); + public function setInput(InputInterface $input): BaseHandlerInterface; /** * Look up the Drupal core package object. @@ -88,7 +94,7 @@ interface BaseHandlerInterface { * @param string|null $path * Optional path into which to chdir before executing command. */ - public function git(string $command, string $path = NULL); + public function git(string $command, string $path = NULL): void; /** * Add the given pattern to gitignore if necessary. @@ -96,7 +102,7 @@ interface BaseHandlerInterface { * @param string $pattern * The pattern which should be ignored. */ - public function gitIgnore(string $pattern); + public function gitIgnore(string $pattern): void; /** * Add the given pattern to git lfs if necessary. @@ -104,6 +110,6 @@ interface BaseHandlerInterface { * @param string $pattern * The pattern which should be added. */ - public function gitLfs(string $pattern); + public function gitLfs(string $pattern): void; }