definitionService->resolve($providerId, $scopeType, $scopeValue); if (! $definition instanceof IdentityMessageDefinition) { continue; } $template = $this->templateService->resolve($definition->id, $channel); if (! $template instanceof IdentityMessageTemplate) { continue; } return [ 'definition' => $definition, 'template' => $template, ]; } return null; } }