original_string: public function parseConfiguration($config)
      {
          if (is_string($config)) {
              $config = ['url' => $config];
          }
  
          $url = $config['url'] ?? null;
  
          $config = Arr::except($config, 'url');
  
          if (! $url) {
              return $config;
          }
  
          $parsedUrl = $this->parseUrl($url);
  
          return array_merge(
              $config,
              $this->getPrimaryOptions($parsedUrl),
              $this->getQueryOptions($parsedUrl)
          );
      }
code: public function parseConfiguration($config)
      {
          if (is_string($config)) {
              $config = ['url' => $config];
          }
  
          $url = $config['url'] ?? null;
  
          $config = Arr::except($config, 'url');
  
          if (! $url) {
              return $config;
          }
  
          $parsedUrl = $this->parseUrl($url);
  
          return array_merge(
              $config,
              $this->getPrimaryOptions($parsedUrl),
              $this->getQueryOptions($parsedUrl)
          );
      }
code_tokens: public function parseConfiguration ( $ config ) { if ( is_string ( $ config ) ) { $ config = [ 'url' => $ config ] ; } $ url = $ config [ 'url' ] ?? null ; $ config = Arr :: except ( $ config , 'url' ) ; if ( ! $ url ) { return $ config ; } $ parsedUrl = $ this -> parseUrl ( $ url ) ; return array_merge ( $ config , $ this -> getPrimaryOptions ( $ parsedUrl ) , $ this -> getQueryOptions ( $ parsedUrl ) ) ; }
docstring: Parse the database configuration, hydrating options using a database configuration URL if possible.
  
  @param  array|string  $config
  @return array
docstring_tokens: Parse the database configuration hydrating options using a database configuration URL if possible .