<commit_before><?php
/**
 * phlexible
 *
 * @copyright 2007-2013 brainbits GmbH (http://www.brainbits.net)
 * @license   proprietary
 */

namespace Phlexible\IndexerElementsComponent\Indexer;

use Phlexible\IndexerComponent\Indexer\AbstractIndexer;
use Phlexible\IndexerComponent\Storage\StorageInterface;
use Phlexible\IndexerElementsComponent\Event\MapDocumentEvent;
use Phlexible\IndexerElementsComponent\Events;
use Phlexible\SiterootsComponent\Siteroot\SiterootRepository;
use Phlexible\TreeComponent\TreeManager;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

/**
 * Elements indexer
 *
 * @author <NAME> <<EMAIL>>
 */
class ElementsIndexer extends AbstractIndexer
{
    /**
     * @var string
     */
    const DOCUMENT_TYPE = 'elements';

    /**
     * @var EventDispatcherInterface
     */
    protected $dispatcher = null;

    /**
     * @var StorageInterface
     */
    protected $storage = null;

    /**
     * @var SiterootRepository
     */
    protected $siterootRepository = null;

    /**
     * @var TreeManager
     */
    protected $treeManager = null;

    /**
     * @var ElementManager
     */
    protected $elementManager;

    /**
     * @var ElementVersionManager
     */
    protected $elementVersionManager = null;

    /**
     * @var ContextManager
     */
    protected $contextManager;

    /**
     * @var string
     */
    protected $requestHandler;

    /**
     * @param EventDispatcherInterface $dispatcher
     * @param StorageInterface         $storage
     * @param SiterootRepository       $siterootRepository
     * @param TreeManager              $treeManager
     * @param ElementManager           $elementManager
     * @param ElementVersionManager    $elementVersionManager
     * @param ContextManager           $contextManager
     * @param string                   $requestHandler
     */
    public function __construct(EventDispatcherInterface $dispatcher,
                                StorageInterface $storage,
                                SiterootRepository $siterootRepository,
                                TreeManager $treeManager,
                                ElementManager $elementManager,
                                ElementVersionManager $elementVersionManager,
                                ContextManager $contextManager,
                                $requestHandler)
    {
        $this->dispatcher            = $dispatcher;
        $this->storage               = $storage;
        $this->siterootRepository       = $siterootRepository;
        $this->treeManager           = $treeManager;
        $this->elementManager        = $elementManager;
        $this->elementVersionManager = $elementVersionManager;
        $this->contextManager        = $contextManager;
        $this->requestHandler        = $requestHandler;
    }

    /**
     * @inheritDoc
     */
    public function getLabel()
    {
        return 'Elements indexer';
    }

    /**
     * @inheritDoc
     */
    public function getStorage()
    {
        return $this->storage;
    }

    /**
     * @inheritDoc
     */
    public function getDocumentFactory()
    {
        return $this->documentFactory;
    }

    /**
     * Return document class
     *
     * @return string
     */
    public function getDocumentClass()
    {<commit_msg>cs fixes<commit_after><?php
/**
 * phlexible
 *
 * @copyright 2007-2013 brainbits GmbH (http://www.brainbits.net)
 * @license   proprietary
 */

namespace Phlexible\IndexerElementsComponent\Indexer;

use Phlexible\IndexerComponent\Indexer\AbstractIndexer;
use Phlexible\IndexerComponent\Storage\StorageInterface;
use Phlexible\IndexerElementsComponent\Event\MapDocumentEvent;
use Phlexible\IndexerElementsComponent\Events;
use Phlexible\SiterootsComponent\Siteroot\SiterootRepository;
use Phlexible\TreeComponent\TreeManager;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

/**
 * Elements indexer
 *
 * @author <NAME> <<EMAIL>>
 */
class ElementsIndexer extends AbstractIndexer
{
    /**
     * @var string
     */
    const DOCUMENT_TYPE = 'elements';

    /**
     * @var EventDispatcherInterface
     */
    protected $dispatcher = null;

    /**
     * @var StorageInterface
     */
    protected $storage = null;

    /**
     * @var SiterootRepository
     */
    protected $siterootRepository = null;

    /**
     * @var TreeManager
     */
    protected $treeManager = null;

    /**
     * @var ElementManager
     */
    protected $elementManager;

    /**
     * @var ElementVersionManager
     */
    protected $elementVersionManager = null;

    /**
     * @var ContextManager
     */
    protected $contextManager;

    /**
     * @var string
     */
    protected $requestHandler;

    /**
     * @param EventDispatcherInterface $dispatcher
     * @param StorageInterface         $storage
     * @param SiterootRepository       $siterootRepository
     * @param TreeManager              $treeManager
     * @param ElementManager           $elementManager
     * @param ElementVersionManager    $elementVersionManager
     * @param ContextManager           $contextManager
     * @param string                   $requestHandler
     */
    public function __construct(EventDispatcherInterface $dispatcher,
                                StorageInterface $storage,
                                SiterootRepository $siterootRepository,
                                TreeManager $treeManager,
                                ElementManager $elementManager,
                                ElementVersionManager $elementVersionManager,
                                ContextManager $contextManager,
                                $requestHandler)
    {
        $this->dispatcher            = $dispatcher;
        $this->storage               = $storage;
        $this->siterootRepository       = $siterootRepository;
        $this->treeManager           = $treeManager;
        $this->elementManager        = $elementManager;
        $this->elementVersionManager = $elementVersionManager;
        $this->contextManager        = $contextManager;
        $this->requestHandler        = $requestHandler;
    }

    /**
     * {@inheritdoc}
     */
    public function getLabel()
    {
        return 'Elements indexer';
    }

    /**
     * {@inheritdoc}
     */
    public function getStorage()
    {
        return $this->storage;
    }

    /**
     * {@inheritdoc}
     */
    public function getDocumentFactory()
    {
        return $this->documentFactory;
    }

    /**
     * Return document class
     *
     * @return string
     */
    public function getDocumentClass()
    {
{'fraction_non_alphanumeric': 0.09393346379647749, 'fraction_numerical': 0.0024085503537558334, 'mean_word_length': 1.9767025089605734, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5495293', 'n_tokens_mistral': 1740, 'n_tokens_neox': 1664, 'n_words': 321}