Datastore/src/Operation.php
private function readOptions(array $options = [])
    {
        $options += [
            'readConsistency' => null,
            'transaction' => null
        ];

        $readOptions = array_filter([
            'readConsistency' => $options['readConsistency'],
            'transaction' => $options['transaction']
        ]);

        return array_filter([
            'readOptions' => $readOptions
        ]);
    }
private function readOptions(array $options = [])
    {
        $options += [
            'readConsistency' => null,
            'transaction' => null
        ];

        $readOptions = array_filter([
            'readConsistency' => $options['readConsistency'],
            'transaction' => $options['transaction']
        ]);

        return array_filter([
            'readOptions' => $readOptions
        ]);
    }
private function readOptions ( array $ options = [ ] ) { $ options += [ 'readConsistency' => null , 'transaction' => null ] ; $ readOptions = array_filter ( [ 'readConsistency' => $ options [ 'readConsistency' ] , 'transaction' => $ options [ 'transaction' ] ] ) ; return array_filter ( [ 'readOptions' => $ readOptions ] ) ; }
Format the readOptions

@param array $options [optional] {
Read Options

@type string $transaction If set, query or lookup will run in transaction.
@type string $readConsistency See
[ReadConsistency](https://cloud.google.com/datastore/reference/rest/v1/ReadOptions#ReadConsistency).
}
@return array
Format the readOptions