original_string: public function readConfigDir(string $path): Configurator
      {
          if (!is_dir($path)) {
              throw new \InvalidArgumentException(
                  sprintf("Config dir isn't a directory! %s given.", $path));
          }
  
          $entitiesDir = new \DirectoryIterator($path);
          foreach ($entitiesDir as $fileInfo) {
              if (!$fileInfo->isFile() || ('php' !== $fileInfo->getExtension())) {
                  continue;
              }
              require_once($fileInfo->getPathname());
          }
  
          return $this;
      }
code: public function readConfigDir(string $path): Configurator
      {
          if (!is_dir($path)) {
              throw new \InvalidArgumentException(
                  sprintf("Config dir isn't a directory! %s given.", $path));
          }
  
          $entitiesDir = new \DirectoryIterator($path);
          foreach ($entitiesDir as $fileInfo) {
              if (!$fileInfo->isFile() || ('php' !== $fileInfo->getExtension())) {
                  continue;
              }
              require_once($fileInfo->getPathname());
          }
  
          return $this;
      }
code_tokens: public function readConfigDir ( string $ path ) : Configurator { if ( ! is_dir ( $ path ) ) { throw new \ InvalidArgumentException ( sprintf ( "Config dir isn't a directory! %s given." , $ path ) ) ; } $ entitiesDir = new \ DirectoryIterator ( $ path ) ; foreach ( $ entitiesDir as $ fileInfo ) { if ( ! $ fileInfo -> isFile ( ) || ( 'php' !== $ fileInfo -> getExtension ( ) ) ) { continue ; } require_once ( $ fileInfo -> getPathname ( ) ) ; } return $ this ; }
docstring: Include all php scripts in the dir
  @param string $path
  @return Configurator
docstring_tokens: Include all php scripts in the dir