original_string: public function addConfig($config, $watcher)
    {
      if (!$this->root) {
        return;
      }
      $config = realpath($config);
  
      $filesystem = new Filesystem();
      $relativePath = $filesystem->makePathRelative($config, $this->root);
      if (substr($relativePath, 0, 2) == "..") {
        return;
      }
  
      if (!isset($this->configs[$watcher])) {
        $this->configs[$watcher] = array();
      }
      $this->configs[$watcher][] = $config;
    }
code: public function addConfig($config, $watcher)
    {
      if (!$this->root) {
        return;
      }
      $config = realpath($config);
  
      $filesystem = new Filesystem();
      $relativePath = $filesystem->makePathRelative($config, $this->root);
      if (substr($relativePath, 0, 2) == "..") {
        return;
      }
  
      if (!isset($this->configs[$watcher])) {
        $this->configs[$watcher] = array();
      }
      $this->configs[$watcher][] = $config;
    }
code_tokens: public function addConfig ( $ config , $ watcher ) { if ( ! $ this -> root ) { return ; } $ config = realpath ( $ config ) ; $ filesystem = new Filesystem ( ) ; $ relativePath = $ filesystem -> makePathRelative ( $ config , $ this -> root ) ; if ( substr ( $ relativePath , 0 , 2 ) == ".." ) { return ; } if ( ! isset ( $ this -> configs [ $ watcher ] ) ) { $ this -> configs [ $ watcher ] = array ( ) ; } $ this -> configs [ $ watcher ] [ ] = $ config ; }
docstring: Add config path to watch
  
  @param string $config  Path to config file
  @param string $watcher Watcher name
  
  @return null
docstring_tokens: Add config path to watch