src/Hook/Hook.php
protected function parseClassEvent($class, $hook)
    {
        if (str_contains($class, '@')) {
            return explode('@', $class);
        }

        // If no method is defined, use the hook name as the method name.
        $method = str_contains($hook, '-') ? str_replace('-', '_', $hook) : $hook;

        return [$class, $method];
    }
protected function parseClassEvent($class, $hook)
    {
        if (str_contains($class, '@')) {
            return explode('@', $class);
        }

        // If no method is defined, use the hook name as the method name.
        $method = str_contains($hook, '-') ? str_replace('-', '_', $hook) : $hook;

        return [$class, $method];
    }
protected function parseClassEvent ( $ class , $ hook ) { if ( str_contains ( $ class , '@' ) ) { return explode ( '@' , $ class ) ; } // If no method is defined, use the hook name as the method name. $ method = str_contains ( $ hook , '-' ) ? str_replace ( '-' , '_' , $ hook ) : $ hook ; return [ $ class , $ method ] ; }
Parse a class name and returns its name and its method.

@param string $class
@param string $hook

@return array
Parse a class name and returns its name and its method .