original_string: public function readEventConfiguration($path, $type)
      {
          if (!file_exists($path)) {
              throw new \InvalidArgumentException('File ' . $path . 'don\'t exists.');
          }
  
          $name = '\BlueEvent\Event\Config\\' . ucfirst($type) . 'Config';
  
          if (!class_exists($name)) {
              throw new \InvalidArgumentException('Incorrect configuration type: ' . $type);
          }
  
          /** @var \BlueEvent\Event\Config\ConfigReader $reader */
          $reader = new $name;
  
          return $this->setEventConfiguration($reader->readConfig($path));
      }
code: public function readEventConfiguration($path, $type)
      {
          if (!file_exists($path)) {
              throw new \InvalidArgumentException('File ' . $path . 'don\'t exists.');
          }
  
          $name = '\BlueEvent\Event\Config\\' . ucfirst($type) . 'Config';
  
          if (!class_exists($name)) {
              throw new \InvalidArgumentException('Incorrect configuration type: ' . $type);
          }
  
          /** @var \BlueEvent\Event\Config\ConfigReader $reader */
          $reader = new $name;
  
          return $this->setEventConfiguration($reader->readConfig($path));
      }
code_tokens: public function readEventConfiguration ( $ path , $ type ) { if ( ! file_exists ( $ path ) ) { throw new \ InvalidArgumentException ( 'File ' . $ path . 'don\'t exists.' ) ; } $ name = '\BlueEvent\Event\Config\\' . ucfirst ( $ type ) . 'Config' ; if ( ! class_exists ( $ name ) ) { throw new \ InvalidArgumentException ( 'Incorrect configuration type: ' . $ type ) ; } /** @var \BlueEvent\Event\Config\ConfigReader $reader */ $ reader = new $ name ; return $ this -> setEventConfiguration ( $ reader -> readConfig ( $ path ) ) ; }
docstring: read configuration from file
  
  @param mixed $path
  @param string $type
  @return $this
  @throws \InvalidArgumentException
docstring_tokens: read configuration from file