Datastore/src/DatastoreClient.php
private function parseSingleMutationResult(array $res)
    {
        $mutationResult = $res['mutationResults'][0];

        if (isset($mutationResult['conflictDetected']) && $mutationResult['conflictDetected']) {
            throw new DomainException(
                'A conflict was detected in the mutation. ' .
                'The operation failed.'
            );
        }

        // cast to string for conformance between REST and gRPC.
        return (string) $mutationResult['version'];
    }
private function parseSingleMutationResult(array $res)
    {
        $mutationResult = $res['mutationResults'][0];

        if (isset($mutationResult['conflictDetected']) && $mutationResult['conflictDetected']) {
            throw new DomainException(
                'A conflict was detected in the mutation. ' .
                'The operation failed.'
            );
        }

        // cast to string for conformance between REST and gRPC.
        return (string) $mutationResult['version'];
    }
private function parseSingleMutationResult ( array $ res ) { $ mutationResult = $ res [ 'mutationResults' ] [ 0 ] ; if ( isset ( $ mutationResult [ 'conflictDetected' ] ) && $ mutationResult [ 'conflictDetected' ] ) { throw new DomainException ( 'A conflict was detected in the mutation. ' . 'The operation failed.' ) ; } // cast to string for conformance between REST and gRPC. return ( string ) $ mutationResult [ 'version' ] ; }
Handle mutation results

@codingStandardsIgnoreStart
@param array $res [MutationResult](https://cloud.google.com/datastore/reference/rest/v1/projects/commit#MutationResult)
@return string
@throws DomainException
@codingStandardsIgnoreEnd
Handle mutation results