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;
    }
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;
    }
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 ; }
Tries to generate an ID for a callable.
We need to try in order to properly unlisten
to a variable

@param *callable $callback the callback function

@return string
Tries to generate an ID for a callable . We need to try in order to properly unlisten to a variable