<commit_before><?php

namespace Oro\Bundle\EmailBundle\Twig;

use Doctrine\ORM\EntityManager;

use Oro\Bundle\EmailBundle\Entity\EmailAttachment;
use Oro\Bundle\EmailBundle\Entity\EmailRecipient;
use Oro\Bundle\EmailBundle\Entity\EmailThread;
use Oro\Bundle\EmailBundle\Tools\EmailAddressHelper;
use Oro\Bundle\EmailBundle\Tools\EmailHolderHelper;

class EmailExtension extends \Twig_Extension
{
    const NAME = 'oro_email';

    /** @var EmailHolderHelper */
    protected $emailHolderHelper;

    /** @var EmailAddressHelper */
    protected $emailAddressHelper;

    /** @var EntityManager */
    protected $em;

    /**
     * @param EmailHolderHelper $emailHolderHelper
     * @param EmailAddressHelper $emailAddressHelper
     * @param EntityManager $em
     */
    public function __construct(
        EmailHolderHelper $emailHolderHelper,
        EmailAddressHelper $emailAddressHelper,
        EntityManager $em)
    {
        $this->emailHolderHelper = $emailHolderHelper;
        $this->emailAddressHelper = $emailAddressHelper;
        $this->em = $em;
    }

    /**
     * {@inheritdoc}
     */
    public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('oro_get_email', [$this, 'getEmail']),
            new \Twig_SimpleFunction('oro_get_email_address_name', [$this, 'getEmailAddressName']),
            new \Twig_SimpleFunction('oro_get_email_address', [$this, 'getEmailAddress']),
            new \Twig_SimpleFunction('oro_get_email_thread_recipients', [$this, 'getEmailThreadRecipients']),<commit_msg>CRM-2596: New UX of working with emails at 'My Emails' page - Code standard<commit_after><?php

namespace Oro\Bundle\EmailBundle\Twig;

use Doctrine\ORM\EntityManager;

use Oro\Bundle\EmailBundle\Entity\EmailAttachment;
use Oro\Bundle\EmailBundle\Entity\EmailRecipient;
use Oro\Bundle\EmailBundle\Entity\EmailThread;
use Oro\Bundle\EmailBundle\Tools\EmailAddressHelper;
use Oro\Bundle\EmailBundle\Tools\EmailHolderHelper;

class EmailExtension extends \Twig_Extension
{
    const NAME = 'oro_email';

    /** @var EmailHolderHelper */
    protected $emailHolderHelper;

    /** @var EmailAddressHelper */
    protected $emailAddressHelper;

    /** @var EntityManager */
    protected $em;

    /**
     * @param EmailHolderHelper $emailHolderHelper
     * @param EmailAddressHelper $emailAddressHelper
     * @param EntityManager $em
     */
    public function __construct(
        EmailHolderHelper $emailHolderHelper,
        EmailAddressHelper $emailAddressHelper,
        EntityManager $em
    ) {
        $this->emailHolderHelper = $emailHolderHelper;
        $this->emailAddressHelper = $emailAddressHelper;
        $this->em = $em;
    }

    /**
     * {@inheritdoc}
     */
    public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('oro_get_email', [$this, 'getEmail']),
            new \Twig_SimpleFunction('oro_get_email_address_name', [$this, 'getEmailAddressName']),
            new \Twig_SimpleFunction('oro_get_email_address', [$this, 'getEmailAddress']),
            new \Twig_SimpleFunction('oro_get_email_thread_recipients', [$this, 'getEmailThreadRecipients']),
{'fraction_non_alphanumeric': 0.1105511811023622, 'fraction_numerical': 0.0012598425196850393, 'mean_word_length': 3.5177809388335706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6981084', 'n_tokens_mistral': 933, 'n_tokens_neox': 908, 'n_words': 169}