<?php declare(strict_types=1);

namespace Newland\Toubiz\Sync\Neos\Tests\Factory;

use Newland\Toubiz\Sync\Neos\Domain\Model\Category;

class CategoryFactory extends AbstractFactory
{

    public function make(array $properties = [])
    {
        $category = new Category();

        $category->setTitle($properties['title'] ?? $this->faker->name);
        $category->setOriginalId($properties['originalId'] ?? $this->faker->uuid);
        if (array_key_exists('language', $properties)) {
            $category->setLanguage($properties['language']);
        }

        return $category;
    }
}
