public function get($index): JWK
    {
        if (!$this->has($index)) {
            throw new InvalidArgumentException('Undefined index.');
        }

        return $this->keys[$index];
    }
public function get($index): JWK
    {
        if (!$this->has($index)) {
            throw new InvalidArgumentException('Undefined index.');
        }

        return $this->keys[$index];
    }
public function get ( $ index ) : JWK { if ( ! $ this -> has ( $ index ) ) { throw new InvalidArgumentException ( 'Undefined index.' ) ; } return $ this -> keys [ $ index ] ; }
Returns the key with the given index. Throws an exception if the index is not present in the key store.

@param int|string $index
Returns the key with the given index . Throws an exception if the index is not present in the key store .