<commit_before><?php

namespace Ojs\JournalBundle\Entity;

use APY\DataGridBundle\Grid\Mapping as GRID;
use Gedmo\Translatable\Translatable;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Ojs\Common\Entity\GenericEntityTrait;

/**
 * Lang
 * @ExclusionPolicy("all")
 * @GRID\Source(columns="id,code,name,rtl")
 */
class Lang implements Translatable
{
    use GenericEntityTrait;

    /**
     * @var integer
     * @Expose()
     * @GRID\Column(title="id")
     */
    private $id;

    /**
     * @var string
     * @Expose()
     * @GRID\Column(title="lang.code")
     */
    private $code;

    /**
     * @var string
     * @Expose()
     * @GRID\Column(title="lang.name")
     */
    private $name;

    /**
     * @var boolean
     * @Expose()
     * @GRID\Column(title="lang.rtl")
     */
    private $rtl;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set code
     *
     * @param  string $code
     * @return Lang
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

    /**
     * Get code
     *
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Set name
     *
     * @param  string $name
     * @return Lang
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set rtl
     *
     * @param  boolean $rtl
     * @return Lang
     */
    public function setRtl($rtl)
    {
        $this->rtl = $rtl;

        return $this;
    }

    /**
     * Get rtl
     *
     * @return boolean
     */
    public function getRtl()
    {
        return $this->rtl;
    }

    public function __toString()
    {
        return $this->name;
    }
}<commit_msg>Lang toString bugfix<commit_after><?php

namespace Ojs\JournalBundle\Entity;

use APY\DataGridBundle\Grid\Mapping as GRID;
use Gedmo\Translatable\Translatable;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Ojs\Common\Entity\GenericEntityTrait;

/**
 * Lang
 * @ExclusionPolicy("all")
 * @GRID\Source(columns="id,code,name,rtl")
 */
class Lang implements Translatable
{
    use GenericEntityTrait;

    /**
     * @var integer
     * @Expose()
     * @GRID\Column(title="id")
     */
    private $id;

    /**
     * @var string
     * @Expose()
     * @GRID\Column(title="lang.code")
     */
    private $code;

    /**
     * @var string
     * @Expose()
     * @GRID\Column(title="lang.name")
     */
    private $name;

    /**
     * @var boolean
     * @Expose()
     * @GRID\Column(title="lang.rtl")
     */
    private $rtl;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set code
     *
     * @param  string $code
     * @return Lang
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

    /**
     * Get code
     *
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Set name
     *
     * @param  string $name
     * @return Lang
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set rtl
     *
     * @param  boolean $rtl
     * @return Lang
     */
    public function setRtl($rtl)
    {
        $this->rtl = $rtl;

        return $this;
    }

    /**
     * Get rtl
     *
     * @return boolean
     */
    public function getRtl()
    {
        return $this->rtl;
    }

    public function __toString()
    {
        return $this->name ? $this->name : '';
    }
}
{'fraction_non_alphanumeric': 0.14485981308411214, 'fraction_numerical': 0.0, 'mean_word_length': 1.600383631713555, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '2255854', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1353, 'n_words': 265}