original_string: public function getTemplates($key)
      {
          /** @var EmailTemplateTranslation[] $templates */
          if ($templates = EmailTemplateTranslation::findAll([
              'template_id' => EmailTemplate::getIdByKey($key)
          ])) {
              return Template::buildTemplates($templates);
          }
  
          return null;
      }
code: public function getTemplates($key)
      {
          /** @var EmailTemplateTranslation[] $templates */
          if ($templates = EmailTemplateTranslation::findAll([
              'template_id' => EmailTemplate::getIdByKey($key)
          ])) {
              return Template::buildTemplates($templates);
          }
  
          return null;
      }
code_tokens: public function getTemplates ( $ key ) { /** @var EmailTemplateTranslation[] $templates */ if ( $ templates = EmailTemplateTranslation :: findAll ( [ 'template_id' => EmailTemplate :: getIdByKey ( $ key ) ] ) ) { return Template :: buildTemplates ( $ templates ) ; } return null ; }
docstring: Getting email template models by key
  
  @param string $key
  @return null|Template[]
docstring_tokens: Getting email template models by key