original_string: public function build(
          $action,
          array $data,
          CliInput $input,
          Mapping $mapping
      )
      {
          $payloadMeta = $this->mapper->getPayloadMeta($data);
          if ($action === 'request') {
              return new RequestApi(
                  $this->logger->getRequestLogger($payloadMeta->getId()),
                  $this->component,
                  $mapping,
                  dirname(realpath($_SERVER['SCRIPT_FILENAME'])),
                  $input->getName(),
                  $input->getVersion(),
                  $input->getFrameworkVersion(),
                  $input->getVariables(),
                  $input->isDebug(),
                  $this->mapper->getHttpRequest($data),
                  $this->mapper->getServiceCall($data),
                  $payloadMeta,
                  $this->mapper->getRequestAttributes($data)
              );
  
          } elseif($action === 'response') {
              return new ResponseApi(
                  $this->logger->getRequestLogger($payloadMeta->getId()),
                  $this->component,
                  $mapping,
                  dirname(realpath($_SERVER['SCRIPT_FILENAME'])),
                  $input->getName(),
                  $input->getVersion(),
                  $input->getFrameworkVersion(),
                  $input->getVariables(),
                  $input->isDebug(),
                  $this->mapper->getHttpRequest($data),
                  $this->mapper->getHttpResponse($data),
                  $this->mapper->getTransport($data),
                  $this->mapper->getPayloadMeta($data),
                  $this->mapper->getReturnValue($data)
              );
          }
  
      }
code: public function build(
          $action,
          array $data,
          CliInput $input,
          Mapping $mapping
      )
      {
          $payloadMeta = $this->mapper->getPayloadMeta($data);
          if ($action === 'request') {
              return new RequestApi(
                  $this->logger->getRequestLogger($payloadMeta->getId()),
                  $this->component,
                  $mapping,
                  dirname(realpath($_SERVER['SCRIPT_FILENAME'])),
                  $input->getName(),
                  $input->getVersion(),
                  $input->getFrameworkVersion(),
                  $input->getVariables(),
                  $input->isDebug(),
                  $this->mapper->getHttpRequest($data),
                  $this->mapper->getServiceCall($data),
                  $payloadMeta,
                  $this->mapper->getRequestAttributes($data)
              );
  
          } elseif($action === 'response') {
              return new ResponseApi(
                  $this->logger->getRequestLogger($payloadMeta->getId()),
                  $this->component,
                  $mapping,
                  dirname(realpath($_SERVER['SCRIPT_FILENAME'])),
                  $input->getName(),
                  $input->getVersion(),
                  $input->getFrameworkVersion(),
                  $input->getVariables(),
                  $input->isDebug(),
                  $this->mapper->getHttpRequest($data),
                  $this->mapper->getHttpResponse($data),
                  $this->mapper->getTransport($data),
                  $this->mapper->getPayloadMeta($data),
                  $this->mapper->getReturnValue($data)
              );
          }
  
      }
code_tokens: public function build ( $ action , array $ data , CliInput $ input , Mapping $ mapping ) { $ payloadMeta = $ this -> mapper -> getPayloadMeta ( $ data ) ; if ( $ action === 'request' ) { return new RequestApi ( $ this -> logger -> getRequestLogger ( $ payloadMeta -> getId ( ) ) , $ this -> component , $ mapping , dirname ( realpath ( $ _SERVER [ 'SCRIPT_FILENAME' ] ) ) , $ input -> getName ( ) , $ input -> getVersion ( ) , $ input -> getFrameworkVersion ( ) , $ input -> getVariables ( ) , $ input -> isDebug ( ) , $ this -> mapper -> getHttpRequest ( $ data ) , $ this -> mapper -> getServiceCall ( $ data ) , $ payloadMeta , $ this -> mapper -> getRequestAttributes ( $ data ) ) ; } elseif ( $ action === 'response' ) { return new ResponseApi ( $ this -> logger -> getRequestLogger ( $ payloadMeta -> getId ( ) ) , $ this -> component , $ mapping , dirname ( realpath ( $ _SERVER [ 'SCRIPT_FILENAME' ] ) ) , $ input -> getName ( ) , $ input -> getVersion ( ) , $ input -> getFrameworkVersion ( ) , $ input -> getVariables ( ) , $ input -> isDebug ( ) , $ this -> mapper -> getHttpRequest ( $ data ) , $ this -> mapper -> getHttpResponse ( $ data ) , $ this -> mapper -> getTransport ( $ data ) , $ this -> mapper -> getPayloadMeta ( $ data ) , $ this -> mapper -> getReturnValue ( $ data ) ) ; } }
docstring: Build a Request Api class instance
  
  @param string $action
  @param array $data
  @param CliInput $input
  @param Mapping $mapping
  @return Api
docstring_tokens: Build a Request Api class instance