public function listNodes($nodeId = null) { if ($nodeId) { return $this->toNode($this->digitalocean->droplet()->getById($nodeId)); } return array_map([$this, 'toNode'], $this->digitalocean->droplet()->getAll()); }