public static function inspect(vfsStreamVisitor $visitor, vfsStreamContent $content = null): vfsStreamVisitor
    {
        if (null !== $content) {
            return $visitor->visit($content);
        }

        $root = vfsStreamWrapper::getRoot();
        if (null === $root) {
            throw new \InvalidArgumentException('No content given and no root directory set.');
        }

        return $visitor->visitDirectory($root);
    }
public static function inspect(vfsStreamVisitor $visitor, vfsStreamContent $content = null): vfsStreamVisitor
    {
        if (null !== $content) {
            return $visitor->visit($content);
        }

        $root = vfsStreamWrapper::getRoot();
        if (null === $root) {
            throw new \InvalidArgumentException('No content given and no root directory set.');
        }

        return $visitor->visitDirectory($root);
    }
public static function inspect ( vfsStreamVisitor $ visitor , vfsStreamContent $ content = null ) : vfsStreamVisitor { if ( null !== $ content ) { return $ visitor -> visit ( $ content ) ; } $ root = vfsStreamWrapper :: getRoot ( ) ; if ( null === $ root ) { throw new \ InvalidArgumentException ( 'No content given and no root directory set.' ) ; } return $ visitor -> visitDirectory ( $ root ) ; }
use visitor to inspect a content structure

If the given content is null it will fall back to use the current root
directory of the stream wrapper.

Returns given visitor for method chaining comfort.

@param   vfsStreamVisitor       $visitor  the visitor who inspects
@param   vfsStreamContent|null  $content  directory structure to inspect
@return  vfsStreamVisitor
@throws  \InvalidArgumentException
@since   0.10.0
@see     https://github.com/mikey179/vfsStream/issues/10
use visitor to inspect a content structure