original_string: protected function createUrlChainFromConfig(
          array $config,
          array $defaultHTTPCodes,
          array $defaultOptions
      ) {
          $urlChain = $this
              ->urlChainFactory
              ->create();
  
          if (
              !isset($config['urls']) ||
              !is_array($config['urls'])
          ) {
              return $urlChain;
          }
  
          $profiles = (
              isset($config['profiles']) &&
              is_array($config['profiles'])
          )
              ? $config['profiles']
              : [];
  
          foreach ($config['urls'] as $urlConfig) {
              $urlChain->addUrl(
                  $this->getURLInstanceFromConfig(
                      $urlConfig,
                      $defaultHTTPCodes,
                      $defaultOptions,
                      $profiles
                  )
              );
          }
  
          return $urlChain;
      }
code: protected function createUrlChainFromConfig(
          array $config,
          array $defaultHTTPCodes,
          array $defaultOptions
      ) {
          $urlChain = $this
              ->urlChainFactory
              ->create();
  
          if (
              !isset($config['urls']) ||
              !is_array($config['urls'])
          ) {
              return $urlChain;
          }
  
          $profiles = (
              isset($config['profiles']) &&
              is_array($config['profiles'])
          )
              ? $config['profiles']
              : [];
  
          foreach ($config['urls'] as $urlConfig) {
              $urlChain->addUrl(
                  $this->getURLInstanceFromConfig(
                      $urlConfig,
                      $defaultHTTPCodes,
                      $defaultOptions,
                      $profiles
                  )
              );
          }
  
          return $urlChain;
      }
code_tokens: protected function createUrlChainFromConfig ( array $ config , array $ defaultHTTPCodes , array $ defaultOptions ) { $ urlChain = $ this -> urlChainFactory -> create ( ) ; if ( ! isset ( $ config [ 'urls' ] ) || ! is_array ( $ config [ 'urls' ] ) ) { return $ urlChain ; } $ profiles = ( isset ( $ config [ 'profiles' ] ) && is_array ( $ config [ 'profiles' ] ) ) ? $ config [ 'profiles' ] : [ ] ; foreach ( $ config [ 'urls' ] as $ urlConfig ) { $ urlChain -> addUrl ( $ this -> getURLInstanceFromConfig ( $ urlConfig , $ defaultHTTPCodes , $ defaultOptions , $ profiles ) ) ; } return $ urlChain ; }
docstring: Given a config array, create an URLChain instance filled with all defined
  URL instances.
  
  @param array    $config           Configuration
  @param string[] $defaultHTTPCodes Array of HTTP Codes
  @param array    $defaultOptions   Default options
  
  @return Url[] Array of URL instances
docstring_tokens: Given a config array create an URLChain instance filled with all defined URL instances .