Simplify optional type value retrieval

This commit is contained in:
netkas 2024-09-19 00:50:00 -04:00
parent 604e1fd3e7
commit b2d2a1ea15

View file

@ -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
];