src/Schema/Directives/BaseDirective.php
protected function getMethodArgumentParts(string $argumentName): array
    {
        $argumentParts = explode(
            '@',
            $this->directiveArgValue($argumentName)
        );

        if (
            count($argumentParts) !== 2
            || empty($argumentParts[0])
            || empty($argumentParts[1])
        ) {
            throw new DirectiveException(
                "Directive '{$this->name()}' must have an argument '{$argumentName}' in the form 'ClassName@methodName'"
            );
        }

        return $argumentParts;
    }
protected function getMethodArgumentParts(string $argumentName): array
    {
        $argumentParts = explode(
            '@',
            $this->directiveArgValue($argumentName)
        );

        if (
            count($argumentParts) !== 2
            || empty($argumentParts[0])
            || empty($argumentParts[1])
        ) {
            throw new DirectiveException(
                "Directive '{$this->name()}' must have an argument '{$argumentName}' in the form 'ClassName@methodName'"
            );
        }

        return $argumentParts;
    }
protected function getMethodArgumentParts ( string $ argumentName ) : array { $ argumentParts = explode ( '@' , $ this -> directiveArgValue ( $ argumentName ) ) ; if ( count ( $ argumentParts ) !== 2 || empty ( $ argumentParts [ 0 ] ) || empty ( $ argumentParts [ 1 ] ) ) { throw new DirectiveException ( "Directive '{$this->name()}' must have an argument '{$argumentName}' in the form 'ClassName@methodName'" ) ; } return $ argumentParts ; }
Split a single method argument into its parts.

A method argument is expected to contain a class and a method name, separated by an @ symbol.
e.g. "App\My\Class@methodName"
This validates that exactly two parts are given and are not empty.

@param  string  $argumentName
@return string[] Contains two entries: [string $className, string $methodName]

@throws \Nuwave\Lighthouse\Exceptions\DirectiveException
Split a single method argument into its parts .