<commit_before><?php
class Kwc_Basic_LinkTag_Data extends Kwf_Component_Data
{
    private $_linkData = false;
    private function _getLinkData()
    {
        if ($this->_linkData === false) {
            $this->_linkData = $this->getChildComponent('-child');
        }
        return $this->_linkData;
    }
    public function __get($var)
    {
        if ($var == 'url') {
            return $this->_getLinkData()->url;
        } else if ($var == 'rel') {
            return $this->_getLinkData()->rel;
        } else {
            return parent::__get($var);
        }
    }

    public function getAbsoluteUrl()
    {
        return $this->_getLinkData()->getAbsoluteUrl();
    }

    public function getLinkDataAttributes()
    {
        return $this->_getLinkData()->getLinkDataAttributes();
    }

    public function getLinkTitle()
    {
        return $this->_getLinkData()->getLinkTitle();
    }<commit_msg>When none is configured as link component, linktag has no url<commit_after><?php
class Kwc_Basic_LinkTag_Data extends Kwf_Component_Data
{
    private $_linkData = null;
    private function _getLinkData()
    {
        if ($this->_linkData === null) {
            $this->_linkData = $this->getChildComponent('-child');
            if (is_instance_of($this->_linkData->componentClass, 'Kwc_Basic_None_Component')) {
                $this->_linkData = false;
            }
        }
        return $this->_linkData;
    }
    public function __get($var)
    {
        if ($var == 'url') {
            if (!$this->_getLinkData()) return '';
            return $this->_getLinkData()->url;
        } else if ($var == 'rel') {
            if (!$this->_getLinkData()) return '';
            return $this->_getLinkData()->rel;
        } else {
            return parent::__get($var);
        }
    }

    public function getAbsoluteUrl()
    {
        if (!$this->_getLinkData()) return '';
        return $this->_getLinkData()->getAbsoluteUrl();
    }

    public function getLinkDataAttributes()
    {
        if (!$this->_getLinkData()) return array();
        return $this->_getLinkData()->getLinkDataAttributes();
    }

    public function getLinkTitle()
    {
        if (!$this->_getLinkData()) return '';
        return $this->_getLinkData()->getLinkTitle();
    }
{'fraction_non_alphanumeric': 0.14566929133858267, 'fraction_numerical': 0.0, 'mean_word_length': 2.2624821683309557, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, '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': '3680375', 'n_tokens_mistral': 645, 'n_tokens_neox': 641, 'n_words': 131}