original_string: public function getReadyForBed()
      {
          $busyStatusses = array(ChildProcessContainer::STATUS_SLEEPY,
              ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY
          );
          if (in_array($this->status, $busyStatusses)) {
              //ready for bed
              return;
          }
          if($this->status  == ChildProcessContainer::STATUS_DEAD)
          {
              // do nothing
          }
          else if ($this->status == ChildProcessContainer::STATUS_BUSY) {
              $this->status = ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY;
          } else {
              $this->status = ChildProcessContainer::STATUS_SLEEPY;
          }
          if ($this->process->isRunning()) {
              $this->sendTERMSignal();
          }
      }
code: public function getReadyForBed()
      {
          $busyStatusses = array(ChildProcessContainer::STATUS_SLEEPY,
              ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY
          );
          if (in_array($this->status, $busyStatusses)) {
              //ready for bed
              return;
          }
          if($this->status  == ChildProcessContainer::STATUS_DEAD)
          {
              // do nothing
          }
          else if ($this->status == ChildProcessContainer::STATUS_BUSY) {
              $this->status = ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY;
          } else {
              $this->status = ChildProcessContainer::STATUS_SLEEPY;
          }
          if ($this->process->isRunning()) {
              $this->sendTERMSignal();
          }
      }
code_tokens: public function getReadyForBed ( ) { $ busyStatusses = array ( ChildProcessContainer :: STATUS_SLEEPY , ChildProcessContainer :: STATUS_BUSY_BUT_SLEEPY ) ; if ( in_array ( $ this -> status , $ busyStatusses ) ) { //ready for bed return ; } if ( $ this -> status == ChildProcessContainer :: STATUS_DEAD ) { // do nothing } else if ( $ this -> status == ChildProcessContainer :: STATUS_BUSY ) { $ this -> status = ChildProcessContainer :: STATUS_BUSY_BUT_SLEEPY ; } else { $ this -> status = ChildProcessContainer :: STATUS_SLEEPY ; } if ( $ this -> process -> isRunning ( ) ) { $ this -> sendTERMSignal ( ) ; } }
docstring: Tells the child to not pick up any more work and go to bed
  
  @return void
docstring_tokens: Tells the child to not pick up any more work and go to bed