public static function inspect($dir)
    {
        if (!is_dir($dir)) {
            throw new FileNotFoundException(sprintf('Directory "%s" does not exist.', $dir));
        }

        foreach (self::getStacks() as $stack) {
            if ($stack->inspect($dir) === true) {
                return $stack;
            }
        }

        // Stacks were not able to identify the structure.
        return new Stacks\NullStack();
    }
public static function inspect($dir)
    {
        if (!is_dir($dir)) {
            throw new FileNotFoundException(sprintf('Directory "%s" does not exist.', $dir));
        }

        foreach (self::getStacks() as $stack) {
            if ($stack->inspect($dir) === true) {
                return $stack;
            }
        }

        // Stacks were not able to identify the structure.
        return new Stacks\NullStack();
    }
public static function inspect ( $ dir ) { if ( ! is_dir ( $ dir ) ) { throw new FileNotFoundException ( sprintf ( 'Directory "%s" does not exist.' , $ dir ) ) ; } foreach ( self :: getStacks ( ) as $ stack ) { if ( $ stack -> inspect ( $ dir ) === true ) { return $ stack ; } } // Stacks were not able to identify the structure. return new Stacks \ NullStack ( ) ; }
Inspects directory with stacks.

@param $dir

@return \mglaman\Toolstack\Stacks\StacksInterface
Inspects directory with stacks .