code: public function printFiles($files, $registry)
      {
          foreach ($files as $file) {
              if (!file_exists(dirname($file->getFilename()))) {
                  mkdir(dirname($file->getFilename()), 0755, true);
              }
  
              file_put_contents($file->getFilename(), $this->prettyPrinter->prettyPrintFile([$file->getNode()]));
          }
  
          foreach ($registry->getSchemas() as $schema) {
              $this->fix($schema->getDirectory());
          }
      }
docs: Print files
  
  @param File[] $files
  @param Registry $registry