original_string: public function setWorklog($date, $ticket, $timeSpent, $comment = '')
      {
          $this->uri = "{$this->site}/rest/api/2/issue/{$ticket}/worklog";
  
          if (is_numeric($timeSpent)) {
              $timeSpent .= 'h';
          }
  
          $startedDate = $this->_formatTimestamp($date);
          $data = [
              'timeSpent' => $timeSpent,
              'started' => $startedDate,
              'comment' => $comment
          ];
  
          $this->output->debug(print_r($data, true));
          $data = json_encode($data);
  
          $response = $this->processRequest($data);
          $this->_handleError($data, $response);
          return $response;
      }
code: public function setWorklog($date, $ticket, $timeSpent, $comment = '')
      {
          $this->uri = "{$this->site}/rest/api/2/issue/{$ticket}/worklog";
  
          if (is_numeric($timeSpent)) {
              $timeSpent .= 'h';
          }
  
          $startedDate = $this->_formatTimestamp($date);
          $data = [
              'timeSpent' => $timeSpent,
              'started' => $startedDate,
              'comment' => $comment
          ];
  
          $this->output->debug(print_r($data, true));
          $data = json_encode($data);
  
          $response = $this->processRequest($data);
          $this->_handleError($data, $response);
          return $response;
      }
code_tokens: public function setWorklog ( $ date , $ ticket , $ timeSpent , $ comment = '' ) { $ this -> uri = "{$this->site}/rest/api/2/issue/{$ticket}/worklog" ; if ( is_numeric ( $ timeSpent ) ) { $ timeSpent .= 'h' ; } $ startedDate = $ this -> _formatTimestamp ( $ date ) ; $ data = [ 'timeSpent' => $ timeSpent , 'started' => $ startedDate , 'comment' => $ comment ] ; $ this -> output -> debug ( print_r ( $ data , true ) ) ; $ data = json_encode ( $ data ) ; $ response = $ this -> processRequest ( $ data ) ; $ this -> _handleError ( $ data , $ response ) ; return $ response ; }
docstring: Create worklog entry in Jira
  
  @param array $site
  @param string $date
  @param string $ticket
  @param mixed $timeSpent
  @param string $comment
  @throws Exception
  @return mixed
docstring_tokens: Create worklog entry in Jira