public function createOne($method, array $tokens, array $options, DataSource $annotation = null) {
        return new Request([
            'method'              => HttpMethod::create($method, $annotation),
            'url'                 => Url::createFromTokens($tokens, $options['host'], $annotation),
            'curlOptions'         => CurlOptions::create(array_merge($options['driverOptions'], HttpHeader::create($options['driverOptions'], $tokens))),
            'query'               => HttpQuery::create($tokens, $options['driverOptions']),
            'payload'             => Payload::create($tokens, $options),
            'expectedStatusCodes' => StatusCode::create($method, $annotation)
        ]);
    }
public function createOne($method, array $tokens, array $options, DataSource $annotation = null) {
        return new Request([
            'method'              => HttpMethod::create($method, $annotation),
            'url'                 => Url::createFromTokens($tokens, $options['host'], $annotation),
            'curlOptions'         => CurlOptions::create(array_merge($options['driverOptions'], HttpHeader::create($options['driverOptions'], $tokens))),
            'query'               => HttpQuery::create($tokens, $options['driverOptions']),
            'payload'             => Payload::create($tokens, $options),
            'expectedStatusCodes' => StatusCode::create($method, $annotation)
        ]);
    }
public function createOne ( $ method , array $ tokens , array $ options , DataSource $ annotation = null ) { return new Request ( [ 'method' => HttpMethod :: create ( $ method , $ annotation ) , 'url' => Url :: createFromTokens ( $ tokens , $ options [ 'host' ] , $ annotation ) , 'curlOptions' => CurlOptions :: create ( array_merge ( $ options [ 'driverOptions' ] , HttpHeader :: create ( $ options [ 'driverOptions' ] , $ tokens ) ) ) , 'query' => HttpQuery :: create ( $ tokens , $ options [ 'driverOptions' ] ) , 'payload' => Payload :: create ( $ tokens , $ options ) , 'expectedStatusCodes' => StatusCode :: create ( $ method , $ annotation ) ] ) ; }
Creates a new Request with the given options

@param  string     $method
@param  array      $tokens
@param  array      $options
@param  DataSource $annotation
@return Request

@SuppressWarnings("PHPMD.StaticAccess")
Creates a new Request with the given options