public function getOpenPorts() { return array_filter($this->ports, function ($port) { return $port->isOpen(); }); }