original_string: protected function urlRoute($module, $controller, $params): string
      {
          $url = $this->getBaseUrl();
  
          if (empty($params) && $controller === self::DEFAULT_CONTROLLER) {
              if ($module === self::DEFAULT_MODULE) {
                  return $url;
              }
              return $url . $module;
          }
  
          $url .= $module . '/' . $controller;
          $getParams = [];
          foreach ($params as $key => $value) {
              // sub-array as GET params
              if (\is_array($value)) {
                  $getParams[$key] = $value;
                  continue;
              }
              $url .= '/' . urlencode((string)$key) . '/' . urlencode((string)$value);
          }
          if (!empty($getParams)) {
              $url .= '?' . http_build_query($getParams);
          }
          return $url;
      }
code: protected function urlRoute($module, $controller, $params): string
      {
          $url = $this->getBaseUrl();
  
          if (empty($params) && $controller === self::DEFAULT_CONTROLLER) {
              if ($module === self::DEFAULT_MODULE) {
                  return $url;
              }
              return $url . $module;
          }
  
          $url .= $module . '/' . $controller;
          $getParams = [];
          foreach ($params as $key => $value) {
              // sub-array as GET params
              if (\is_array($value)) {
                  $getParams[$key] = $value;
                  continue;
              }
              $url .= '/' . urlencode((string)$key) . '/' . urlencode((string)$value);
          }
          if (!empty($getParams)) {
              $url .= '?' . http_build_query($getParams);
          }
          return $url;
      }
code_tokens: protected function urlRoute ( $ module , $ controller , $ params ) : string { $ url = $ this -> getBaseUrl ( ) ; if ( empty ( $ params ) && $ controller === self :: DEFAULT_CONTROLLER ) { if ( $ module === self :: DEFAULT_MODULE ) { return $ url ; } return $ url . $ module ; } $ url .= $ module . '/' . $ controller ; $ getParams = [ ] ; foreach ( $ params as $ key => $ value ) { // sub-array as GET params if ( \ is_array ( $ value ) ) { $ getParams [ $ key ] = $ value ; continue ; } $ url .= '/' . urlencode ( ( string ) $ key ) . '/' . urlencode ( ( string ) $ value ) ; } if ( ! empty ( $ getParams ) ) { $ url .= '?' . http_build_query ( $ getParams ) ; } return $ url ; }
docstring: Build URL by default route
  
  @param  string $module
  @param  string $controller
  @param  array  $params
  
  @return string
docstring_tokens: Build URL by default route