license_key)) { $visible = substr($this->license_key, 0, 8); $hidden_len = max(0, strlen($this->license_key) - 8); $key_display = $visible . str_repeat('*', min($hidden_len, 20)); } return [ 'slug' => $this->slug, 'name' => $this->name, 'version' => $this->version, 'basename' => $this->basename, 'item_id' => $this->item_id, 'store_link' => $this->store_link, 'license_key' => $key_display, // redacted 'status' => $this->status, 'expires_at' => $this->expires_at, 'activations_used' => $this->activations_used, 'activations_limit' => $this->activations_limit, 'is_legacy' => $this->is_legacy, ]; } }