original_string: private function createTreeFromTaskName($taskName, $postfix = '', $isLast = false)
      {
          $task = $this->tasks->get($taskName);
  
          if ($task->getBefore()) {
              $beforePostfix = sprintf(' [before:%s]', $task->getName());
  
              foreach ($task->getBefore() as $beforeTask) {
                  $this->createTreeFromTaskName($beforeTask, $beforePostfix);
              }
          }
  
          if ($task instanceof GroupTask) {
              $isLast = $isLast && empty($task->getAfter());
  
              $this->addTaskToTree($task->getName() . $postfix, $isLast);
  
              if (!$isLast) {
                  $this->openGroupDepths[] = $this->depth;
              }
  
              $this->depth++;
  
              $taskGroup = $task->getGroup();
              foreach ($taskGroup as $subtask) {
                  $isLastSubtask = $subtask === end($taskGroup);
                  $this->createTreeFromTaskName($subtask, '', $isLastSubtask);
              }
  
              if (!$isLast) {
                  array_pop($this->openGroupDepths);
              }
  
              $this->depth--;
          } else {
              $this->addTaskToTree($task->getName() . $postfix, $isLast);
          }
  
          if ($task->getAfter()) {
              $afterPostfix = sprintf(' [after:%s]', $task->getName());
  
              foreach ($task->getAfter() as $afterTask) {
                  $this->createTreeFromTaskName($afterTask, $afterPostfix);
              }
          }
      }
code: private function createTreeFromTaskName($taskName, $postfix = '', $isLast = false)
      {
          $task = $this->tasks->get($taskName);
  
          if ($task->getBefore()) {
              $beforePostfix = sprintf(' [before:%s]', $task->getName());
  
              foreach ($task->getBefore() as $beforeTask) {
                  $this->createTreeFromTaskName($beforeTask, $beforePostfix);
              }
          }
  
          if ($task instanceof GroupTask) {
              $isLast = $isLast && empty($task->getAfter());
  
              $this->addTaskToTree($task->getName() . $postfix, $isLast);
  
              if (!$isLast) {
                  $this->openGroupDepths[] = $this->depth;
              }
  
              $this->depth++;
  
              $taskGroup = $task->getGroup();
              foreach ($taskGroup as $subtask) {
                  $isLastSubtask = $subtask === end($taskGroup);
                  $this->createTreeFromTaskName($subtask, '', $isLastSubtask);
              }
  
              if (!$isLast) {
                  array_pop($this->openGroupDepths);
              }
  
              $this->depth--;
          } else {
              $this->addTaskToTree($task->getName() . $postfix, $isLast);
          }
  
          if ($task->getAfter()) {
              $afterPostfix = sprintf(' [after:%s]', $task->getName());
  
              foreach ($task->getAfter() as $afterTask) {
                  $this->createTreeFromTaskName($afterTask, $afterPostfix);
              }
          }
      }
code_tokens: private function createTreeFromTaskName ( $ taskName , $ postfix = '' , $ isLast = false ) { $ task = $ this -> tasks -> get ( $ taskName ) ; if ( $ task -> getBefore ( ) ) { $ beforePostfix = sprintf ( ' [before:%s]' , $ task -> getName ( ) ) ; foreach ( $ task -> getBefore ( ) as $ beforeTask ) { $ this -> createTreeFromTaskName ( $ beforeTask , $ beforePostfix ) ; } } if ( $ task instanceof GroupTask ) { $ isLast = $ isLast && empty ( $ task -> getAfter ( ) ) ; $ this -> addTaskToTree ( $ task -> getName ( ) . $ postfix , $ isLast ) ; if ( ! $ isLast ) { $ this -> openGroupDepths [ ] = $ this -> depth ; } $ this -> depth ++ ; $ taskGroup = $ task -> getGroup ( ) ; foreach ( $ taskGroup as $ subtask ) { $ isLastSubtask = $ subtask === end ( $ taskGroup ) ; $ this -> createTreeFromTaskName ( $ subtask , '' , $ isLastSubtask ) ; } if ( ! $ isLast ) { array_pop ( $ this -> openGroupDepths ) ; } $ this -> depth -- ; } else { $ this -> addTaskToTree ( $ task -> getName ( ) . $ postfix , $ isLast ) ; } if ( $ task -> getAfter ( ) ) { $ afterPostfix = sprintf ( ' [after:%s]' , $ task -> getName ( ) ) ; foreach ( $ task -> getAfter ( ) as $ afterTask ) { $ this -> createTreeFromTaskName ( $ afterTask , $ afterPostfix ) ; } } }
docstring: Create a tree from the given taskname
  
  @param string $taskName
  @param string $postfix
  @param bool $isLast
  
  @return void
docstring_tokens: Create a tree from the given taskname