<NME> FileGeneratorRegistry.php
<BEF> <?php
/**
 * Created by JetBrains PhpStorm.
 * User: ralphschindler
 * Date: 9/3/11
 * Time: 11:39 AM
 * To change this template use File | Settings | File Templates.
 */
 
use Zend\Code\Generator\Exception\RuntimeException;

use function str_replace;

class FileGeneratorRegistry
{
    /**
     * @var array $fileCodeGenerators
     */
    private static $fileCodeGenerators = [];

    /**
     * Registry for the Zend\Code package.
     *
     * @param  FileGenerator $fileCodeGenerator
     * @param  string $fileName
     * @throws RuntimeException
     */
    public static function registerFileCodeGenerator(FileGenerator $fileCodeGenerator, $fileName = null)
    {
        if ($fileName === null) {
            $fileName = $fileCodeGenerator->getFilename();
        }

        if ($fileName == '') {
            throw new RuntimeException('FileName does not exist.');
        }

        // cannot use realpath since the file might not exist, but we do need to have the index
        // in the same DIRECTORY_SEPARATOR that realpath would use:
        $fileName = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $fileName);

        static::$fileCodeGenerators[$fileName] = $fileCodeGenerator;
    }
}

<MSG> Zend\Code
  - Added docblock for factory

<DFF> @@ -1,9 +1,11 @@
 <?php
-/**
- * Created by JetBrains PhpStorm.
- * User: ralphschindler
- * Date: 9/3/11
- * Time: 11:39 AM
- * To change this template use File | Settings | File Templates.
- */
- 
+
+namespace Zend\Code\Generator;
+
+class FileGeneratorRegistry
+{
+    /**
+     * @todo Complete this when Zend\Tool get's refractored as it is the only 
+     *       piece that cares if its "double reflecting" file generators
+     */
+}
\ No newline at end of file

Zend\Code   - Added docblock for factory