code: private function getNextJob($tube, $state)
      {
          if ('ready' == $this->state) {
              return $this->reserveJob($tube);
          }
  
          return $this->peekJob($tube, $state);
      }
docs: Fetches the next job from the tube.
  For ready jobs do reserve, for delayed and buried - peek.
  
  @param $tube
  @param $state
  
  @return bool|object|\Pheanstalk\Job|void