original_string: public function getConfigFile($name, $required = true, $directory = 'config')
      {
          $sep = DIRECTORY_SEPARATOR;
          $path = rtrim($this->directory, $sep) . $sep . trim($directory, $sep) . $sep . $name;
          if (!file_exists($path)) {
              if ($required) {
                  throw new \Exception("Config file '$path' does not exist");
              } else {
                  return null;
              }
          }
          return $path;
      }
code: public function getConfigFile($name, $required = true, $directory = 'config')
      {
          $sep = DIRECTORY_SEPARATOR;
          $path = rtrim($this->directory, $sep) . $sep . trim($directory, $sep) . $sep . $name;
          if (!file_exists($path)) {
              if ($required) {
                  throw new \Exception("Config file '$path' does not exist");
              } else {
                  return null;
              }
          }
          return $path;
      }
code_tokens: public function getConfigFile ( $ name , $ required = true , $ directory = 'config' ) { $ sep = DIRECTORY_SEPARATOR ; $ path = rtrim ( $ this -> directory , $ sep ) . $ sep . trim ( $ directory , $ sep ) . $ sep . $ name ; if ( ! file_exists ( $ path ) ) { if ( $ required ) { throw new \ Exception ( "Config file '$path' does not exist" ) ; } else { return null ; } } return $ path ; }
docstring: Gets the filename for a config file
  
  @param string $name
  @param bool $required whether the file must exist. Default is `true`.
  @param string $directory the name of the config directory. Default is `config`.
  @return string|null the full path to the config file or `null` if $required
  is set to `false` and the file does not exist
  @throws \Exception
docstring_tokens: Gets the filename for a config file