src/Bedrock/Bootstrap/BootableResolver.php
public function resolve($item): Bootable
    {
        if(is_string($item) && class_exists($item)) {
            if (null !== $this->container) {
                $item = $this->container->get($item);
            }
            if (is_string($item)) {
                $item = new $item();
            }
        } elseif (is_callable($item)) {
            $item = new CallableProcess($item);
        }

        if (!$item instanceof Bootable) {
            throw new InvalidBootableProcessException($item);
        }

        return $item;
    }
public function resolve($item): Bootable
    {
        if(is_string($item) && class_exists($item)) {
            if (null !== $this->container) {
                $item = $this->container->get($item);
            }
            if (is_string($item)) {
                $item = new $item();
            }
        } elseif (is_callable($item)) {
            $item = new CallableProcess($item);
        }

        if (!$item instanceof Bootable) {
            throw new InvalidBootableProcessException($item);
        }

        return $item;
    }
public function resolve ( $ item ) : Bootable { if ( is_string ( $ item ) && class_exists ( $ item ) ) { if ( null !== $ this -> container ) { $ item = $ this -> container -> get ( $ item ) ; } if ( is_string ( $ item ) ) { $ item = new $ item ( ) ; } } elseif ( is_callable ( $ item ) ) { $ item = new CallableProcess ( $ item ) ; } if ( ! $ item instanceof Bootable ) { throw new InvalidBootableProcessException ( $ item ) ; } return $ item ; }
Try to return a resolved item or throw an exception
@param mixed $item
@return Bootable
@throws InvalidBootableProcessException
Try to return a resolved item or throw an exception