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