/**
  * @param Branch|null $branch
  * @param User|null   $reporter
  *
  * @return CreateTicketCommand
  */
 public function createCreateTicketCommand(Branch $branch = null, User $reporter = null)
 {
     $command = new CreateTicketCommand();
     if ($branch) {
         $command->branch = $branch;
         if ($branch->getDefaultAssignee()) {
             $command->assignee = $branch->getDefaultAssignee();
         }
     }
     if ($reporter) {
         $command->reporter = $reporter;
     }
     return $command;
 }