<commit_before><?php

class JsonExport
{
	private $__converter = false;
	public $non_restrictive_export = true;

    public function handler($data, $options = array())
    {
		if ($options['scope'] === 'Attribute') {
			return $this->__attributeHandler($data, $options);
		} else if($options['scope'] === 'Event') {
			return $this->__eventHandler($data, $options);
        } else if($options['scope'] === 'Object') {
            return $this->__eventHandler($data, $options);
		} else if($options['scope'] === 'Sighting') {
			return $this->__sightingsHandler($data, $options);
		}
    }

	private function __eventHandler($event, $options = array()) {
		if ($this->__converter === false) {
			App::uses('JSONConverterTool', 'Tools');
			$this->__converter = new JSONConverterTool();<commit_msg>fix: [export] JSON export used the wrong handler for /objects/restSearch<commit_after><?php

class JsonExport
{
	private $__converter = false;
	public $non_restrictive_export = true;

    public function handler($data, $options = array())
    {
		if ($options['scope'] === 'Attribute') {
			return $this->__attributeHandler($data, $options);
		} else if($options['scope'] === 'Event') {
			return $this->__eventHandler($data, $options);
        } else if($options['scope'] === 'Object') {
            return $this->__objectHandler($data, $options);
		} else if($options['scope'] === 'Sighting') {
			return $this->__sightingsHandler($data, $options);
		}
    }

	private function __eventHandler($event, $options = array()) {
		if ($this->__converter === false) {
			App::uses('JSONConverterTool', 'Tools');
			$this->__converter = new JSONConverterTool();
{'fraction_non_alphanumeric': 0.18363636363636363, 'fraction_numerical': 0.0, 'mean_word_length': 4.577702702702703, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '3600884', 'n_tokens_mistral': 531, 'n_tokens_neox': 494, 'n_words': 110}