code: protected function peekJob($tube, $state)
      {
          $peekMethod = 'peek'.ucfirst($state);
  
          try {
              return $this->getPheanstalk()->$peekMethod($tube);
          } catch (ServerException $e) {
              if ($this->isNotFoundException($e)) {
                  return;
              }
  
              throw $e;
          }
      }
docs: Peek a job in a spesific state.
  
  @param $tube
  @param $state
  
  @throws ServerException
  @throws \Exception