<commit_before><?php

namespace Pizza\Model;

use Symfony\Component\Validator\Constraints as Assert;
use Patchwork\Model\AbstractModel;
use Patchwork\Model\SortableModel;
use Patchwork\Model\ClonableModel;
use Patchwork\Model\TogglableModel;
use Patchwork\Model\ImageModel;

class Pizza extends AbstractModel
{
    use SortableModel, ClonableModel, TogglableModel, ImageModel;

    const WIDTH = 480;
    const HEIGHT = 320;



    protected function asserts()
    {
        return array(
            'title' => new Assert\NotBlank(),
            'content' => new Assert\NotBlank(),
            'image' => new Assert\Image(),
            'position' => null,
            'active' => null
        );
    }
<commit_msg>now using slug trait, also implemented traits abstract methods<commit_after><?php

namespace Pizza\Model;

use Symfony\Component\Validator\Constraints as Assert;
use Patchwork\Model\AbstractModel;
use Patchwork\Model\SortableModel;
use Patchwork\Model\ClonableModel;
use Patchwork\Model\TogglableModel;
use Patchwork\Model\SlugModel;
use Patchwork\Model\ImageModel;
use Patchwork\Helper\Tools;

class Pizza extends AbstractModel
{
    use SortableModel, ClonableModel, TogglableModel, SlugModel, ImageModel;

    public function getSlug()
    {
        return Tools::vulgarize($this->title);
    }

    public function getWidth()
    {
        return 480;
    }

    public function getHeight()
    {
        return 320;
    }



    protected function asserts()
    {
        return array(
            'title' => new Assert\NotBlank(),
            'content' => new Assert\NotBlank(),
            'image' => new Assert\Image(),
            'position' => null,
            'active' => null
        );
    }

{'fraction_non_alphanumeric': 0.10220673635307782, 'fraction_numerical': 0.006968641114982578, 'mean_word_length': 2.7785087719298245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '1036774', 'n_tokens_mistral': 534, 'n_tokens_neox': 493, 'n_words': 122}