original_string: protected function prepareListReportRoute(array &$routes)
      {
          $permissions = $this->getPermissionsReportRole();
  
          foreach ($routes as $pattern => &$route) {
  
              if (strpos($pattern, 'admin') === 0 && !isset($route['access'])) {
                  $route['access'] = 'admin';
              }
  
              if (!isset($route['access'])) {
                  $route['access'] = GC_PERM_PUBLIC;
              }
  
              $access_names = array();
  
              if (isset($permissions[$route['access']])) {
                  $access_names[$route['access']] = $this->text($permissions[$route['access']]);
              } else {
                  $access_names[''] = $this->text($permissions[GC_PERM_PUBLIC]);
              }
  
              if ($route['access'] === GC_PERM_SUPERADMIN) {
                  $access_names = array(GC_PERM_SUPERADMIN => $this->text($permissions[GC_PERM_SUPERADMIN]));
              }
  
              $route['pattern'] = $pattern;
              $route['access_name'] = implode(' + ', $access_names);
              $route['access'] = implode('', array_keys($access_names));
              $route['status'] = !isset($route['status']) || !empty($route['status']);
          }
      }
code: protected function prepareListReportRoute(array &$routes)
      {
          $permissions = $this->getPermissionsReportRole();
  
          foreach ($routes as $pattern => &$route) {
  
              if (strpos($pattern, 'admin') === 0 && !isset($route['access'])) {
                  $route['access'] = 'admin';
              }
  
              if (!isset($route['access'])) {
                  $route['access'] = GC_PERM_PUBLIC;
              }
  
              $access_names = array();
  
              if (isset($permissions[$route['access']])) {
                  $access_names[$route['access']] = $this->text($permissions[$route['access']]);
              } else {
                  $access_names[''] = $this->text($permissions[GC_PERM_PUBLIC]);
              }
  
              if ($route['access'] === GC_PERM_SUPERADMIN) {
                  $access_names = array(GC_PERM_SUPERADMIN => $this->text($permissions[GC_PERM_SUPERADMIN]));
              }
  
              $route['pattern'] = $pattern;
              $route['access_name'] = implode(' + ', $access_names);
              $route['access'] = implode('', array_keys($access_names));
              $route['status'] = !isset($route['status']) || !empty($route['status']);
          }
      }
code_tokens: protected function prepareListReportRoute ( array & $ routes ) { $ permissions = $ this -> getPermissionsReportRole ( ) ; foreach ( $ routes as $ pattern => & $ route ) { if ( strpos ( $ pattern , 'admin' ) === 0 && ! isset ( $ route [ 'access' ] ) ) { $ route [ 'access' ] = 'admin' ; } if ( ! isset ( $ route [ 'access' ] ) ) { $ route [ 'access' ] = GC_PERM_PUBLIC ; } $ access_names = array ( ) ; if ( isset ( $ permissions [ $ route [ 'access' ] ] ) ) { $ access_names [ $ route [ 'access' ] ] = $ this -> text ( $ permissions [ $ route [ 'access' ] ] ) ; } else { $ access_names [ '' ] = $ this -> text ( $ permissions [ GC_PERM_PUBLIC ] ) ; } if ( $ route [ 'access' ] === GC_PERM_SUPERADMIN ) { $ access_names = array ( GC_PERM_SUPERADMIN => $ this -> text ( $ permissions [ GC_PERM_SUPERADMIN ] ) ) ; } $ route [ 'pattern' ] = $ pattern ; $ route [ 'access_name' ] = implode ( ' + ' , $ access_names ) ; $ route [ 'access' ] = implode ( '' , array_keys ( $ access_names ) ) ; $ route [ 'status' ] = ! isset ( $ route [ 'status' ] ) || ! empty ( $ route [ 'status' ] ) ; } }
docstring: Prepares an array of routes
  @param array $routes
docstring_tokens: Prepares an array of routes