<commit_before><?php

namespace Bolt\Extension\Ohlandt\PusherRealtime\Listener;

use Bolt\Events\StorageEvent;
use Bolt\Events\StorageEvents;
use Pimple;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class StorageEventListener implements EventSubscriberInterface
{
    /** @var Pimple */
    private $app;

    /** @var array */
    private $config;

    /**
     * Initiate the listener with Bolt Application instance and extension config.
     *
     * @param $app
     * @param $config
     */
    public function __construct(Pimple $app, array $config)
    {
        $this->app = $app;
        $this->config = $config;
    }

     /**
      * Handles POST_SAVE storage event
      *
      * @param StorageEvent $event
      */
     public function onPostSave(StorageEvent $event)
     {
         $id = $event->getId();
         $contenttype = $event->getContentType();
         $record = $event->getContent();
         $created = $event->isCreate();
     }

    /**
     * Handles POST_DELETE storage event
     *
     * @param StorageEvent $event
     */
    public function onPostDelete(StorageEvent $event)
    {
        $id = $event->getId();
        $contenttype = $event->getContentType();
        $record = $event->getContent();<commit_msg>alias Pimple to Container<commit_after><?php

namespace Bolt\Extension\Ohlandt\PusherRealtime\Listener;

use Bolt\Events\StorageEvent;
use Bolt\Events\StorageEvents;
use Pimple as Container;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class StorageEventListener implements EventSubscriberInterface
{
    /** @var Container */
    private $container;

    /** @var array */
    private $config;

    /**
     * Initiate the listener with Bolt Application instance and extension config.
     *
     * @param Container $container
     * @param $config
     */
    public function __construct(Container $container, array $config)
    {
        $this->container = $container;
        $this->config = $config;
    }

     /**
      * Handles POST_SAVE storage event
      *
      * @param StorageEvent $event
      */
     public function onPostSave(StorageEvent $event)
     {
         $id = $event->getId();
         $contenttype = $event->getContentType();
         $record = $event->getContent();
         $created = $event->isCreate();
     }

    /**
     * Handles POST_DELETE storage event
     *
     * @param StorageEvent $event
     */
    public function onPostDelete(StorageEvent $event)
    {
        $id = $event->getId();
        $contenttype = $event->getContentType();
        $record = $event->getContent();
{'fraction_non_alphanumeric': 0.11949444657219456, 'fraction_numerical': 0.0, 'mean_word_length': 2.5537414965986396, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '1869458', 'n_tokens_mistral': 745, 'n_tokens_neox': 733, 'n_words': 171}