From 5f10297f90de8fc6317a2ae6ca55ad0de3e88c06 Mon Sep 17 00:00:00 2001 From: peter279k Date: Wed, 4 Oct 2023 10:11:58 +0800 Subject: [PATCH] Resolves issue#33 --- src/CLI/CLI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CLI/CLI.php b/src/CLI/CLI.php index 0f437e8..30247d9 100644 --- a/src/CLI/CLI.php +++ b/src/CLI/CLI.php @@ -270,7 +270,7 @@ public function parse(array $args): array */ public function match(): ?Task { - return isset($this->tasks[$this->command]) ? $this->tasks[$this->command] : null; + return $this->tasks[$this->command] ?? null; } /** @@ -285,7 +285,7 @@ protected function getParams(Hook $hook): array $params = []; foreach ($hook->getParams() as $key => $param) { - $value = (isset($this->args[$key])) ? $this->args[$key] : $param['default']; + $value = $this->args[$key] ?? $param['default']; $this->validate($key, $param, $value);