@@ -204,7 +204,7 @@ public function putIf(string $key, string $value, $compareValue, bool $returnNew
204204 $ compare = $ this ->getCompareForIf ($ key , $ compareValue );
205205 $ failOperation = $ this ->getFailOperation ($ key , $ returnNewValueOnFail );
206206
207- $ response = $ this ->txnRequest ($ key , [$ operation ], $ failOperation , [$ compare ]);
207+ $ response = $ this ->txnRequest ([$ operation ], $ failOperation , [$ compare ]);
208208 return $ this ->getIfResponse ($ returnNewValueOnFail , $ response );
209209 }
210210
@@ -224,7 +224,7 @@ public function deleteIf(string $key, $compareValue, bool $returnNewValueOnFail
224224 $ compare = $ this ->getCompareForIf ($ key , $ compareValue );
225225 $ failOperation = $ this ->getFailOperation ($ key , $ returnNewValueOnFail );
226226
227- $ response = $ this ->txnRequest ($ key , [$ operation ], $ failOperation , [$ compare ]);
227+ $ response = $ this ->txnRequest ([$ operation ], $ failOperation , [$ compare ]);
228228 return $ this ->getIfResponse ($ returnNewValueOnFail , $ response );
229229 }
230230
@@ -291,16 +291,15 @@ public function refreshLease(int $leaseID)
291291 }
292292
293293 /**
294- * Execute $requestOperation if $key value matches $previous otherwise $returnNewValueOnFail
294+ * Execute $requestOperations if Compare succeeds, execute $failureOperations otherwise if defined
295295 *
296- * @param string $key
297296 * @param array $requestOperations operations to perform on success, array of RequestOp objects
298297 * @param array|null $failureOperations operations to perform on failure, array of RequestOp objects
299298 * @param array $compare array of Compare objects
300299 * @return TxnResponse
301300 * @throws InvalidResponseStatusCodeException
302301 */
303- public function txnRequest (string $ key , array $ requestOperations , ?array $ failureOperations , array $ compare ): TxnResponse
302+ public function txnRequest (array $ requestOperations , ?array $ failureOperations , array $ compare ): TxnResponse
304303 {
305304 $ client = $ this ->getKvClient ();
306305
0 commit comments