public static function create(string $contents)
    {
        $contextInst = new ContextFactory();

        $context = function (string $namespace) use ($contents, $contextInst) {
            return $contextInst->createForNamespace($namespace, $contents);
        };

        $phpdocInst = DocBlockFactory::createInstance();

        $phpdoc = function (string $doc, Context $context) use ($phpdocInst) {
            return $phpdocInst->create($doc, $context);
        };

        return new self($context, $phpdoc);
    }
public static function create(string $contents)
    {
        $contextInst = new ContextFactory();

        $context = function (string $namespace) use ($contents, $contextInst) {
            return $contextInst->createForNamespace($namespace, $contents);
        };

        $phpdocInst = DocBlockFactory::createInstance();

        $phpdoc = function (string $doc, Context $context) use ($phpdocInst) {
            return $phpdocInst->create($doc, $context);
        };

        return new self($context, $phpdoc);
    }
public static function create ( string $ contents ) { $ contextInst = new ContextFactory ( ) ; $ context = function ( string $ namespace ) use ( $ contents , $ contextInst ) { return $ contextInst -> createForNamespace ( $ namespace , $ contents ) ; } ; $ phpdocInst = DocBlockFactory :: createInstance ( ) ; $ phpdoc = function ( string $ doc , Context $ context ) use ( $ phpdocInst ) { return $ phpdocInst -> create ( $ doc , $ context ) ; } ; return new self ( $ context , $ phpdoc ) ; }
Create a new doc visitor aware of file contents.

@param string $contents

@return \GrahamCampbell\Analyzer\DocVisitor
Create a new doc visitor aware of file contents .