protected function resolvePseudoCallable($callableOrArray)
    {
        if (is_array($callableOrArray)) {
            $this->dereferenceArray($callableOrArray);
        }

        // normal callable
        if (is_callable($callableOrArray)) {
            return $callableOrArray;
        } else {
            throw new LogicException(
                Message::get(Message::CALLABLE_INVALID, $callableOrArray),
                Message::CALLABLE_INVALID
            );
        }
    }