<commit_before><?php

namespace App\Models\Orm;

use Nette\Utils\Strings;
use Orm;


/**
 * @property string      $title
 * @property string      $slug
 * @property NULL|string $description
 */
abstract class TitledEntity extends Entity
{

	/**
	 * @param $title
	 */
	public function setTitle($title)
	{
		$this->setValue('title', $title);
		$this->setValue('slug', Strings::webalize($title));
	}

}<commit_msg>fix empty description not saving<commit_after><?php

namespace App\Models\Orm;

use Nette\Utils\Strings;
use Orm;


/**
 * @property string      $title
 * @property string      $slug
 * @property NULL|string $description
 */
abstract class TitledEntity extends Entity
{

	/**
	 * @param $title
	 */
	public function setTitle($title)
	{
		$this->setValue('title', $title);
		$this->setValue('slug', Strings::webalize($title));
	}

	public function getDescription()
	{
		$o = $this->getValue('description');
		return $o ?: NULL;
	}

}
{'fraction_non_alphanumeric': 0.15889830508474576, 'fraction_numerical': 0.0, 'mean_word_length': 3.921875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '7197111', 'n_tokens_mistral': 320, 'n_tokens_neox': 313, 'n_words': 72}