original_string: public function getTransactionName(Request $request)
      {
          $route = $request->route();
  
          if (is_array($route)) {
              // Try the assigned controller action
              if (isset($route[1]) && isset($route[1]['uses'])) {
                  return $route[1]['uses'];
              } // Try named routes
              elseif (isset($route[1]) && isset($route[1]['as'])) {
                  return $route[1]['as'];
              }
          }
  
          return 'index.php';
      }
code: public function getTransactionName(Request $request)
      {
          $route = $request->route();
  
          if (is_array($route)) {
              // Try the assigned controller action
              if (isset($route[1]) && isset($route[1]['uses'])) {
                  return $route[1]['uses'];
              } // Try named routes
              elseif (isset($route[1]) && isset($route[1]['as'])) {
                  return $route[1]['as'];
              }
          }
  
          return 'index.php';
      }
code_tokens: public function getTransactionName ( Request $ request ) { $ route = $ request -> route ( ) ; if ( is_array ( $ route ) ) { // Try the assigned controller action if ( isset ( $ route [ 1 ] ) && isset ( $ route [ 1 ] [ 'uses' ] ) ) { return $ route [ 1 ] [ 'uses' ] ; } // Try named routes elseif ( isset ( $ route [ 1 ] ) && isset ( $ route [ 1 ] [ 'as' ] ) ) { return $ route [ 1 ] [ 'as' ] ; } } return 'index.php' ; }
docstring: Builds the transaction name. It will return the assigned controller action first, then the route name before
  falling back to just "index.php"
  
  @param Request $request
  
  @return string
docstring_tokens: Builds the transaction name . It will return the assigned controller action first then the route name before falling back to just index . php