/** * Commit the prepared transaction. * * @return mixed * * @throws \Neoxygen\NeoClient\Exception\CommandException if the transaction was already committed */ public function commit() { if ($this->committed) { throw new CommandException('The prepared transaction has already been commited'); } $response = Client::commitPreparedTransaction($this); $this->committed = true; return $response; }