cognome ?? null) ? trim((string) $this->cognome) : ''; $nome = is_string($this->nome ?? null) ? trim((string) $this->nome) : ''; $ragione = is_string($this->ragione_sociale ?? null) ? trim((string) $this->ragione_sociale) : ''; $cod = is_string($this->cod_cond ?? null) ? trim((string) $this->cod_cond) : ''; $full = trim($cognome . ' ' . $nome); if ($full !== '') { return $cod !== '' ? ($full . ' (' . $cod . ')') : $full; } if ($ragione !== '') { return $cod !== '' ? ($ragione . ' (' . $cod . ')') : $ragione; } return $cod !== '' ? $cod : ('Condomino #' . (string) $this->getKey()); } }