Spanner/src/KeyRange.php
public function setEnd($type, array $end)
    {
        if (!in_array($type, array_keys($this->definition))) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid KeyRange type. Allowed values are %s',
                implode(', ', array_keys($this->definition))
            ));
        }

        $rangeKey = $this->fromDefinition($type, 'end');

        $this->endType = $rangeKey;
        $this->end = $end;
    }
public function setEnd($type, array $end)
    {
        if (!in_array($type, array_keys($this->definition))) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid KeyRange type. Allowed values are %s',
                implode(', ', array_keys($this->definition))
            ));
        }

        $rangeKey = $this->fromDefinition($type, 'end');

        $this->endType = $rangeKey;
        $this->end = $end;
    }
public function setEnd ( $ type , array $ end ) { if ( ! in_array ( $ type , array_keys ( $ this -> definition ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid KeyRange type. Allowed values are %s' , implode ( ', ' , array_keys ( $ this -> definition ) ) ) ) ; } $ rangeKey = $ this -> fromDefinition ( $ type , 'end' ) ; $ this -> endType = $ rangeKey ; $ this -> end = $ end ; }
Set the range end.

Example:
```
$range->setEnd(KeyRange::TYPE_CLOSED, ['Jill']);
```

@param string $type Either "open" or "closed". Use constants
`KeyRange::TYPE_OPEN` and `KeyRange::TYPE_CLOSED` for guaranteed
correctness.
@param array $end The end of the key range.
@return void
Set the range end .