<commit_before><?php

namespace CultuurNet\UDB3\Event;

use Broadway\EventHandling\EventListenerInterface;
use \CultureFeed_Cdb_Item_Event as Event;
use CultuurNet\UDB3\Cdb\EventItemFactory;
use CultuurNet\UDB3\Event\Events\EventCdbXMLInterface;
use CultuurNet\UDB3\Event\Events\EventImportedFromUDB2;
use CultuurNet\UDB3\Event\Events\EventUpdatedFromUDB2;
use CultuurNet\UDB3\Event\ReadModel\CacheCalendarRepository;
use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait;

class EventCalendarProjector implements EventListenerInterface
{
    use DelegateEventHandlingToSpecificMethodTrait;

    /**
     * @var CacheCalendarRepository
     */
    protected $repository;

    /**
     * @param CacheCalendarRepository $repository
     */
    public function __construct(CacheCalendarRepository $repository)
    {
        $this->repository = $repository;
    }

    /**
     * @param EventImportedFromUDB2 $eventImportedFromUDB2
     */
    public function applyEventImportedFromUDB2(EventImportedFromUDB2 $eventImportedFromUDB2)
    {<commit_msg>III-288: EventCalendarProjector should take any instance of CalendarRepositoryInterface, not a specific one.<commit_after><?php

namespace CultuurNet\UDB3\Event;

use Broadway\EventHandling\EventListenerInterface;
use \CultureFeed_Cdb_Item_Event as Event;
use CultuurNet\UDB3\Cdb\EventItemFactory;
use CultuurNet\UDB3\Event\Events\EventCdbXMLInterface;
use CultuurNet\UDB3\Event\Events\EventImportedFromUDB2;
use CultuurNet\UDB3\Event\Events\EventUpdatedFromUDB2;
use CultuurNet\UDB3\Event\ReadModel\CacheCalendarRepository;
use CultuurNet\UDB3\Event\ReadModel\CalendarRepositoryInterface;
use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait;

class EventCalendarProjector implements EventListenerInterface
{
    use DelegateEventHandlingToSpecificMethodTrait;

    /**
     * @var CalendarRepositoryInterface
     */
    protected $repository;

    /**
     * @param CalendarRepositoryInterface $repository
     */
    public function __construct(CalendarRepositoryInterface $repository)
    {
        $this->repository = $repository;
    }

    /**
     * @param EventImportedFromUDB2 $eventImportedFromUDB2
     */
    public function applyEventImportedFromUDB2(EventImportedFromUDB2 $eventImportedFromUDB2)
    {
{'fraction_non_alphanumeric': 0.07575757575757576, 'fraction_numerical': 0.013852813852813853, 'mean_word_length': 5.1462765957446805, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '654289', 'n_tokens_mistral': 716, 'n_tokens_neox': 700, 'n_words': 107}