original_string: public function listProfiles() {
      $dirs = $this->config['profile.dirs'];
      $profiles = array();
      foreach ($dirs as $dir) {
        if (!is_dir($dir) || !is_readable($dir)) {
          continue;
        }
        $files = scandir($dir);
        foreach ($files as $file) {
          if (preg_match('/(.*)\.profile$/', $file, $m)) {
             $profiles[] = $m[1];
          }
        }
      }
      return $profiles;
    }
code: public function listProfiles() {
      $dirs = $this->config['profile.dirs'];
      $profiles = array();
      foreach ($dirs as $dir) {
        if (!is_dir($dir) || !is_readable($dir)) {
          continue;
        }
        $files = scandir($dir);
        foreach ($files as $file) {
          if (preg_match('/(.*)\.profile$/', $file, $m)) {
             $profiles[] = $m[1];
          }
        }
      }
      return $profiles;
    }
code_tokens: public function listProfiles ( ) { $ dirs = $ this -> config [ 'profile.dirs' ] ; $ profiles = array ( ) ; foreach ( $ dirs as $ dir ) { if ( ! is_dir ( $ dir ) || ! is_readable ( $ dir ) ) { continue ; } $ files = scandir ( $ dir ) ; foreach ( $ files as $ file ) { if ( preg_match ( '/(.*)\.profile$/' , $ file , $ m ) ) { $ profiles [ ] = $ m [ 1 ] ; } } } return $ profiles ; }
docstring: List all available profiles
  
  @return array List of available profiles
docstring_tokens: List all available profiles