<commit_before><?php

namespace CultuurNet\UDB3\Place\Commands;

use CultuurNet\UDB3\Label;
use CultuurNet\UDB3\Offer\Commands\OfferCommandFactoryInterface;

class PlaceCommandFactory implements OfferCommandFactoryInterface
{
    /**
     * @param $id
     * @param Label $label
     * @return AddLabel
     */
    public function createAddLabelCommand($id, Label $label)
    {
        return new AddLabel($id, $label);
    }

    /**
     * @param $id
     * @param Label $label
     * @return DeleteLabel
     */
    public function createDeleteLabelCommand($id, Label $label)
    {
        return new DeleteLabel($id, $label);
    }
}
<commit_msg>III-657: Add translation to CommandFactory<commit_after><?php

namespace CultuurNet\UDB3\Place\Commands;

use CultuurNet\UDB3\Label;
use CultuurNet\UDB3\Language;
use CultuurNet\UDB3\Offer\Commands\AbstractTranslateDescription;
use CultuurNet\UDB3\Offer\Commands\AbstractTranslateTitle;
use CultuurNet\UDB3\Offer\Commands\OfferCommandFactoryInterface;
use ValueObjects\String\String;

class PlaceCommandFactory implements OfferCommandFactoryInterface
{
    /**
     * @param $id
     * @param Label $label
     * @return AddLabel
     */
    public function createAddLabelCommand($id, Label $label)
    {
        return new AddLabel($id, $label);
    }

    /**
     * @param $id
     * @param Label $label
     * @return DeleteLabel
     */
    public function createDeleteLabelCommand($id, Label $label)
    {
        return new DeleteLabel($id, $label);
    }

    /**
     * @param $id
     * @param Language $language
     * @param String $title
     * @return AbstractTranslateTitle
     */
    public function createTranslateTitleCommand($id, Language $language, String $title)
    {
        return new TranslateTitle($id, $language, $title);
    }

    /**
     * @param $id
     * @param Language $language
     * @param String $description
     * @return AbstractTranslateDescription
     */
    public function createTranslateDescriptionCommand($id, Language $language, String $description)
    {
        return new TranslateDescription($id, $language, $description);
    }
}

{'fraction_non_alphanumeric': 0.10575573233504913, 'fraction_numerical': 0.005615348619560131, 'mean_word_length': 3.1274131274131274, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6949095', 'n_tokens_mistral': 639, 'n_tokens_neox': 638, 'n_words': 142}