/**
  * Do some stuff on file.
  *
  * @param array         $configuration
  * @param FileContainer $fileContainer
  *
  * @return void
  */
 public function generate(array $configuration, FileContainer $fileContainer)
 {
     foreach ($fileContainer->getFiles() as $file) {
         if (true === $file instanceof ClassFileDefinition) {
             /** @var ClassFileDefinition $file * */
             foreach ($file->getMethods() as $method) {
                 if (null === $method->getReturnValue() && false === $method->isMagic() && false === $method->isStatic()) {
                     $method->setReturnValue('$this');
                 }
             }
         }
     }
 }
 /**
  * @param FileContainer $fileContainer
  */
 private function fixCs(FileContainer $fileContainer)
 {
     $finder = [];
     foreach ($fileContainer->getFiles() as $file) {
         $finder[] = new \SplFileInfo($file->getFilePath());
     }
     $config = new Config();
     $fixer = new Fixer();
     $fixer->registerBuiltInConfigs();
     $fixer->registerBuiltInFixers();
     $resolver = new ConfigurationResolver();
     $resolver->setAllFixers($fixer->getFixers())->setConfig($config)->setOptions(['level' => 'symfony', 'fixers' => null, 'progress' => false])->resolve();
     $config->fixers($resolver->getFixers());
     $config->finder(new \ArrayIterator($finder));
     $fixer->fix($config);
 }