You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
499 B

<?php
namespace App\Service;
use App\Entity\Task;
// Génère la source de changeset
class SourceGenerator
{
public function generate(Task $task): string
{
$parts = [];
$project = $task->getProject();
$parts[] = $project->getName();
$parts[] = $task->getName();
foreach (explode(' ', $project->getHashtags()) as $hashtag) {
$parts[] = '#'.$hashtag;
}
$source = implode(' ', $parts);
return $source;
}
}