From b2d2a1ea154ab4afa199605e2995003a0b27386f Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 19 Sep 2024 00:50:00 -0400 Subject: [PATCH] Simplify optional type value retrieval --- .../Objects/ProjectConfiguration/UpdateSource/Repository.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ncc/Objects/ProjectConfiguration/UpdateSource/Repository.php b/src/ncc/Objects/ProjectConfiguration/UpdateSource/Repository.php index b74d84d..393517c 100644 --- a/src/ncc/Objects/ProjectConfiguration/UpdateSource/Repository.php +++ b/src/ncc/Objects/ProjectConfiguration/UpdateSource/Repository.php @@ -138,8 +138,7 @@ { return [ ($bytecode ? Functions::cbc('name') : 'name') => $this->name, - // TODO: Review the ? logic here to see if makes sense - ($bytecode ? Functions::cbc('type') : 'type') => ($this->type ? null : $this->type->value), + ($bytecode ? Functions::cbc('type') : 'type') => $this->type?->value, ($bytecode ? Functions::cbc('host') : 'host') => $this->host, ($bytecode ? Functions::cbc('ssl') : 'ssl') => $this->ssl ];