protected function getId(callable $callback): string
    {
        if (is_array($callback)) {
            if (isset($callback[0]) && is_object($callback[0])) {
                $callback[0] = spl_object_hash($callback[0]);
            }

            return $callback[0].'::'.$callback[1];
        }

        if ($callback instanceof Closure) {
            return spl_object_hash($callback);
        }

        return $callback;
    }