<commit_before><?php
namespace Nayjest\Grids;

use \Exception;

class ObjectDataRow extends DataRow
{

    /**
     * @param string $fieldName
     * @return mixed
     * @throws Exception
     */
    protected function extractCellValue($fieldName)
    {

        if (strpos($fieldName, '.') !== false) {
            $parts = explode('.', $fieldName);
            $res = $this->src;
            foreach ($parts as $part) {
                $res = $res->{$part};
                if ($res === null) {
                    return $res;
                }
            }
            return $res;
        } else {
            try {
                return $this->src->{$fieldName};
            } catch(Exception $e) {
                var_dump($this->src);
                echo "!!!";
                die();
                //throw new Exception("Can't read '$fieldName' property from DataRow");
            }
<commit_msg>ObjectDataRow: debug code cleaned up<commit_after><?php
namespace Nayjest\Grids;

use \Exception;

class ObjectDataRow extends DataRow
{

    /**
     * @param string $fieldName
     * @return mixed
     * @throws Exception
     */
    protected function extractCellValue($fieldName)
    {

        if (strpos($fieldName, '.') !== false) {
            $parts = explode('.', $fieldName);
            $res = $this->src;
            foreach ($parts as $part) {
                $res = $res->{$part};
                if ($res === null) {
                    return $res;
                }
            }
            return $res;
        } else {
            try {
                return $this->src->{$fieldName};
            } catch(Exception $e) {
                throw new Exception("Can't read '$fieldName' property from DataRow");
            }

{'fraction_non_alphanumeric': 0.1345496009122007, 'fraction_numerical': 0.0, 'mean_word_length': 1.3975409836065573, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '911959', 'n_tokens_mistral': 482, 'n_tokens_neox': 463, 'n_words': 115}