<commit_before><?php namespace CoandaCMS\Coanda\Pages\Repositories\Eloquent\Presenters;

use Lang;

/**
 * Class Page
 * @package CoandaCMS\Coanda\Pages\Presenters
 */
class Page extends \CoandaCMS\Coanda\Core\Presenters\Presenter {

    /**
     * @return mixed
     */
    public function name()
	{
		if ($this->model->name !== '')
		{
			return htmlspecialchars($this->model->name);<commit_msg>Try to generate the name from the version before returning *not set*, just makes the interface look a bit better.<commit_after><?php namespace CoandaCMS\Coanda\Pages\Repositories\Eloquent\Presenters;

use Lang;

/**
 * Class Page
 * @package CoandaCMS\Coanda\Pages\Presenters
 */
class Page extends \CoandaCMS\Coanda\Core\Presenters\Presenter {

    /**
     * @return mixed
     */
    public function name()
	{
		if ($this->model->name !== '')
		{
			return htmlspecialchars($this->model->name);
		}

		$generated_name = $this->model->pageType()->generateName($this->model->versions()->first());

		if ($generated_name !== '')
		{
			return htmlspecialchars($generated_name);
{'fraction_non_alphanumeric': 0.15176908752327747, 'fraction_numerical': 0.0, 'mean_word_length': 3.820627802690583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6648190', 'n_tokens_mistral': 354, 'n_tokens_neox': 331, 'n_words': 68}