original_string: public function delete($job_id = null)
      {
          $result = null;
          $this->hook->attach('job.delete.before', $job_id, $result, $this);
  
          if (isset($result)) {
              return (bool) $result;
          }
  
          $result = $this->session->delete("jobs.$job_id");
          $this->hook->attach('job.delete.after', $job_id, $result, $this);
          return (bool) $result;
      }
code: public function delete($job_id = null)
      {
          $result = null;
          $this->hook->attach('job.delete.before', $job_id, $result, $this);
  
          if (isset($result)) {
              return (bool) $result;
          }
  
          $result = $this->session->delete("jobs.$job_id");
          $this->hook->attach('job.delete.after', $job_id, $result, $this);
          return (bool) $result;
      }
code_tokens: public function delete ( $ job_id = null ) { $ result = null ; $ this -> hook -> attach ( 'job.delete.before' , $ job_id , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( bool ) $ result ; } $ result = $ this -> session -> delete ( "jobs.$job_id" ) ; $ this -> hook -> attach ( 'job.delete.after' , $ job_id , $ result , $ this ) ; return ( bool ) $ result ; }
docstring: Deletes a job from the session
  @param mixed $job_id
  @return boolean
docstring_tokens: Deletes a job from the session