public static function getStackByType($type)
    {
        foreach (self::getStacks() as $stack) {
            if ($stack->isType($type)) {
                return $stack;
            }
        }
        return new Stacks\NullStack();
    }
public static function getStackByType($type)
    {
        foreach (self::getStacks() as $stack) {
            if ($stack->isType($type)) {
                return $stack;
            }
        }
        return new Stacks\NullStack();
    }
public static function getStackByType ( $ type ) { foreach ( self :: getStacks ( ) as $ stack ) { if ( $ stack -> isType ( $ type ) ) { return $ stack ; } } return new Stacks \ NullStack ( ) ; }
Returns a stack based on type.

@param $type

@return \mglaman\Toolstack\Stacks\StacksInterface
Returns a stack based on type .