src/Concerns/HasProcessor.php
protected static function validateProcessor($processor)
    {
        if (!is_subclass_of($processor, AbstractProcessor::class)) {
            throw new InvalidArgumentException('Processor must be an instanceof ' . AbstractProcessor::class);
        }
        return is_string($processor) ? new $processor() : $processor;
    }
protected static function validateProcessor($processor)
    {
        if (!is_subclass_of($processor, AbstractProcessor::class)) {
            throw new InvalidArgumentException('Processor must be an instanceof ' . AbstractProcessor::class);
        }
        return is_string($processor) ? new $processor() : $processor;
    }
protected static function validateProcessor ( $ processor ) { if ( ! is_subclass_of ( $ processor , AbstractProcessor :: class ) ) { throw new InvalidArgumentException ( 'Processor must be an instanceof ' . AbstractProcessor :: class ) ; } return is_string ( $ processor ) ? new $ processor ( ) : $ processor ; }
Validate processor and return in normalized form.

@param  mixed             $processor
@return AbstractProcessor
Validate processor and return in normalized form .