client->getEntity(); if (!$repository->getIp()) { throw new ValidatorException('IP is required'); } $params = [ 'json' => [ 'broadcast_ip' => '255.255.255.255', 'mac' => $client->getMac() ] ]; $content = $this->createRequest('POST', 'http://'.$repository->getIp(). ':8006/ogrepository/v1/wol', $params); $client->setStatus(ClientStatus::INITIALIZING); $this->entityManager->persist($client); $this->entityManager->flush(); $this->createService->__invoke($client, CommandTypes::SHUTDOWN, TraceStatus::SUCCESS, '', []); return new JsonResponse(data: $client, status: Response::HTTP_OK); } }