original_string: public function then(callable $fn, $runInBackground = false)
      {
          $this->after = $fn;
          // Force the job to run in foreground
          if ($runInBackground === false) {
              $this->inForeground();
          }
  
          return $this;
      }
code: public function then(callable $fn, $runInBackground = false)
      {
          $this->after = $fn;
          // Force the job to run in foreground
          if ($runInBackground === false) {
              $this->inForeground();
          }
  
          return $this;
      }
code_tokens: public function then ( callable $ fn , $ runInBackground = false ) { $ this -> after = $ fn ; // Force the job to run in foreground if ( $ runInBackground === false ) { $ this -> inForeground ( ) ; } return $ this ; }
docstring: Set a function to be called after job execution.
  By default this will force the job to run in foreground
  because the output is injected as a parameter of this
  function, but it could be avoided by passing true as a
  second parameter. The job will run in background if it
  meets all the other criteria.
  
  @param  callable $fn
  @param  bool $runInBackground
  @return self
docstring_tokens: Set a function to be called after job execution . By default this will force the job to run in foreground because the output is injected as a parameter of this function but it could be avoided by passing true as a second parameter . The job will run in background if it meets all the other criteria .