<commit_before><?php

namespace Oro\Bundle\EmailBundle\Entity\Manager;

use Doctrine\ORM\EntityManager;

use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;

use Oro\Bundle\ActivityBundle\Manager\ActivityManager;
use Oro\Bundle\ActivityBundle\Model\ActivityInterface;
use Oro\Bundle\EmailBundle\Entity\Email;
use Oro\Bundle\EmailBundle\Entity\Provider\EmailThreadProvider;
use Oro\Bundle\EmailBundle\Provider\EmailActivityListProvider;
use Oro\Bundle\EntityConfigBundle\DependencyInjection\Utils\ServiceLink;
use Oro\Bundle\SecurityBundle\Authentication\Token\OrganizationContextTokenInterface;

/**
 * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
 */
class EmailActivityManager
{
    /** @var ActivityManager */
    protected $activityManager;

    /** @var EmailActivityListProvider */
    protected $activityListProvider;

    /** @var EmailThreadProvider */
    protected $emailThreadProvider;

    /** @var TokenStorage */
    protected $tokenStorage;

    /** @var ServiceLink */
    protected $entityOwnerAccessorLink;

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

    /**
     * @param ActivityManager           $activityManager
     * @param EmailActivityListProvider $activityListProvider
     * @param EmailThreadProvider       $emailThreadProvider
     * @param TokenStorage              $tokenStorage
     * @param ServiceLink               $entityOwnerAccessorLink
     * @param EntityManager             $em
     */
    public function __construct(<commit_msg>CRM-4788: New contact created too slow if it has relation with emails<commit_after><?php

namespace Oro\Bundle\EmailBundle\Entity\Manager;

use Doctrine\ORM\EntityManager;

use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;

use Oro\Bundle\ActivityBundle\Manager\ActivityManager;
use Oro\Bundle\ActivityBundle\Model\ActivityInterface;
use Oro\Bundle\EmailBundle\Entity\Email;
use Oro\Bundle\EmailBundle\Entity\Provider\EmailThreadProvider;
use Oro\Bundle\EmailBundle\Provider\EmailActivityListProvider;
use Oro\Bundle\EntityConfigBundle\DependencyInjection\Utils\ServiceLink;
use Oro\Bundle\SecurityBundle\Authentication\Token\OrganizationContextTokenInterface;

class EmailActivityManager
{
    /** @var ActivityManager */
    protected $activityManager;

    /** @var EmailActivityListProvider */
    protected $activityListProvider;

    /** @var EmailThreadProvider */
    protected $emailThreadProvider;

    /** @var TokenStorage */
    protected $tokenStorage;

    /** @var ServiceLink */
    protected $entityOwnerAccessorLink;

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

    /**
     * @param ActivityManager           $activityManager
     * @param EmailActivityListProvider $activityListProvider
     * @param EmailThreadProvider       $emailThreadProvider
     * @param TokenStorage              $tokenStorage
     * @param ServiceLink               $entityOwnerAccessorLink
     * @param EntityManager             $em
     */
    public function __construct(
{'fraction_non_alphanumeric': 0.09142100033123551, 'fraction_numerical': 0.001324942033786022, 'mean_word_length': 3.8089171974522293, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6961071', 'n_tokens_mistral': 779, 'n_tokens_neox': 766, 'n_words': 147}