<commit_before><?php
namespace App\View;

use Cake\Core\Configure;
use Cake\Datasource\EntityInterface;
use Cake\ORM\ResultSet;
use Cake\Utility\Inflector;
use Cake\View\View;

class ApiView
	extends View
{

	private $_aliases =
	[ 'Character'           => ['player_id' => 'plin']
	, 'Condition'           => ['id' => 'coin']
	, 'Player'              => ['id' => 'plin']
	, 'Power'               => ['id' => 'poin']
	, 'Item'                => ['id' => 'itin']
	];

	private $_compact =
	[ 'AttributesItem'      => ['attribute', 'item']
	, 'Character'           => ['player_id', 'chin', 'name']
    , 'CharactersCondition' => ['expiry', 'character', 'condition']
    , 'CharactersPower'     => ['expiry', 'character', 'power']
	, 'CharactersSkill'     => ['character','skill']
	, 'CharactersSpell'     => ['level', 'character', 'spell']
	, 'Item'                => ['id', 'name', 'expiry', 'character']
	, 'Lammy'               => ['id', 'entity', 'key1', 'key2', 'printed']
	, 'Player'              => ['id', 'full_name']
	, 'Skill'               => ['id', 'name', 'cost', 'mana_amount', 'manatype']
	, 'Spell'               => ['id', 'name', 'short']
	];

	public function render($view = null, $layout = null)
	{
		$data = $this->get($this->get('viewVar'));
		if(is_null($data)) {
			$data->get('_serialize', $this->viewVars);
		} elseif(is_array($data) || $data instanceof ResultSet) {
			$data = $this->_jsonList($data, $this->get('parent'));
		} else {
			$data = $this->_jsonData($data);
		}<commit_msg>ApiView: fix fatal error, used wrong object<commit_after><?php
namespace App\View;

use Cake\Core\Configure;
use Cake\Datasource\EntityInterface;
use Cake\ORM\ResultSet;
use Cake\Utility\Inflector;
use Cake\View\View;

class ApiView
	extends View
{

	private $_aliases =
	[ 'Character'           => ['player_id' => 'plin']
	, 'Condition'           => ['id' => 'coin']
	, 'Player'              => ['id' => 'plin']
	, 'Power'               => ['id' => 'poin']
	, 'Item'                => ['id' => 'itin']
	];

	private $_compact =
	[ 'AttributesItem'      => ['attribute', 'item']
	, 'Character'           => ['player_id', 'chin', 'name']
    , 'CharactersCondition' => ['expiry', 'character', 'condition']
    , 'CharactersPower'     => ['expiry', 'character', 'power']
	, 'CharactersSkill'     => ['character','skill']
	, 'CharactersSpell'     => ['level', 'character', 'spell']
	, 'Item'                => ['id', 'name', 'expiry', 'character']
	, 'Lammy'               => ['id', 'entity', 'key1', 'key2', 'printed']
	, 'Player'              => ['id', 'full_name']
	, 'Skill'               => ['id', 'name', 'cost', 'mana_amount', 'manatype']
	, 'Spell'               => ['id', 'name', 'short']
	];

	public function render($view = null, $layout = null)
	{
		$data = $this->get($this->get('viewVar'));
		if(is_null($data)) {
			$data = $this->get('_serialize', $this->viewVars);
		} elseif(is_array($data) || $data instanceof ResultSet) {
			$data = $this->_jsonList($data, $this->get('parent'));
		} else {
			$data = $this->_jsonData($data);
		}
{'fraction_non_alphanumeric': 0.22840314136125656, 'fraction_numerical': 0.0013089005235602095, 'mean_word_length': 2.914212548015365, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 59, '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': '618433', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1053, 'n_words': 211}