<commit_before><?php

class CM_MessageStream_Service {

    /** @var CM_MessageStream_Adapter_Abstract|null */
    private $_adapter;

    /**
     * @param CM_MessageStream_Adapter_Abstract|null $adapter
     * @throws CM_Exception_Invalid
     */
    public function __construct(CM_MessageStream_Adapter_Abstract $adapter = null) {
        $this->_adapter = $adapter;
    }

    /**
     * @return boolean
     */
    public function getEnabled() {
        return null !== $this->_adapter;
    }

    /**
     * @return CM_MessageStream_Adapter_Abstract|null
     */
    public function getAdapter() {
        return $this->_adapter;
    }

    /**
     * @return string|null
     */
    public function getAdapterClass() {
        $adapter = $this->getAdapter();
        if (null === $adapter) {
            return null;
        }
        return get_class($adapter);
    }

    public function startSynchronization() {
        if (!$this->getEnabled()) {
            throw new CM_Exception('Stream is not enabled');
        }
        $this->getAdapter()->startSynchronization();
    }

    public function synchronize() {
        if (!$this->getEnabled()) {
            throw new CM_Exception('Stream is not enabled');
        }
        $this->getAdapter()->synchronize();
    }

    /**
     * @return array
     */
    public function getOptions() {
        return $this->getAdapter()->getOptions();
    }

    /**
     * @param string     $channel
     * @param string     $event
     * @param mixed|null $data
     */
    public function publish($channel, $event, $data = null) {<commit_msg>Standards<commit_after><?php

class CM_MessageStream_Service {

    /** @var CM_MessageStream_Adapter_Abstract|null */
    private $_adapter;

    /**
     * @param CM_MessageStream_Adapter_Abstract|null $adapter
     * @throws CM_Exception_Invalid
     */
    public function __construct(CM_MessageStream_Adapter_Abstract $adapter = null) {
        $this->_adapter = $adapter;
    }

    /**
     * @return boolean
     */
    public function getEnabled() {
        return null !== $this->_adapter;
    }

    /**
     * @return CM_MessageStream_Adapter_Abstract|null
     */
    public function getAdapter() {
        return $this->_adapter;
    }

    /**
     * @return string|null
     */
    public function getAdapterClass() {
        if (null === $this->getAdapter()) {
            return null;
        }
        return get_class($this->getAdapter());
    }

    public function startSynchronization() {
        if (!$this->getEnabled()) {
            throw new CM_Exception('Stream is not enabled');
        }
        $this->getAdapter()->startSynchronization();
    }

    public function synchronize() {
        if (!$this->getEnabled()) {
            throw new CM_Exception('Stream is not enabled');
        }
        $this->getAdapter()->synchronize();
    }

    /**
     * @return array
     */
    public function getOptions() {
        if (null === $this->getAdapter()) {
            return [];
        }
        return $this->getAdapter()->getOptions();
    }

    /**
     * @param string     $channel
     * @param string     $event
     * @param mixed|null $data
     */
    public function publish($channel, $event, $data = null) {
{'fraction_non_alphanumeric': 0.13257459243309752, 'fraction_numerical': 0.0, 'mean_word_length': 2.1450676982591874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '5307875', 'n_tokens_mistral': 899, 'n_tokens_neox': 886, 'n_words': 190}