original_string: private function familyPlanning()
      {
          list($total, $available) = $this->countWorkers();
          if ($this->shutdownGracefully) {
              if ($total > 0) {
                  $this->verboseOutput("<info>Shutting down</info> $total remaining children");
                  foreach ($this->family as $cnr => $child) {
                      $this->verboseOutput("<info>Child: $cnr </info>" . $child->status);
                  }
                  $this->tellChildrenToPrepareForBed();
  
              } else {
                  $this->keepWorking = false;
              }
              return;
          }
          list($shouldHaveLessWorkers, $shouldHaveMoreWorkers) = $this->moreOrLess($total, $available);
          if ($shouldHaveMoreWorkers) {
              $this->family[] = $this->spawnChild();
          }
          if ($shouldHaveLessWorkers) {
              //find one of the family members not doing anything and cap it!
              if ($this->findDisposableWorkers()) {
                  //we found one
                  $this->verboseOutput("<info>Found a disposable worker</info>");
              }
          }
      }
code: private function familyPlanning()
      {
          list($total, $available) = $this->countWorkers();
          if ($this->shutdownGracefully) {
              if ($total > 0) {
                  $this->verboseOutput("<info>Shutting down</info> $total remaining children");
                  foreach ($this->family as $cnr => $child) {
                      $this->verboseOutput("<info>Child: $cnr </info>" . $child->status);
                  }
                  $this->tellChildrenToPrepareForBed();
  
              } else {
                  $this->keepWorking = false;
              }
              return;
          }
          list($shouldHaveLessWorkers, $shouldHaveMoreWorkers) = $this->moreOrLess($total, $available);
          if ($shouldHaveMoreWorkers) {
              $this->family[] = $this->spawnChild();
          }
          if ($shouldHaveLessWorkers) {
              //find one of the family members not doing anything and cap it!
              if ($this->findDisposableWorkers()) {
                  //we found one
                  $this->verboseOutput("<info>Found a disposable worker</info>");
              }
          }
      }
code_tokens: private function familyPlanning ( ) { list ( $ total , $ available ) = $ this -> countWorkers ( ) ; if ( $ this -> shutdownGracefully ) { if ( $ total > 0 ) { $ this -> verboseOutput ( "<info>Shutting down</info> $total remaining children" ) ; foreach ( $ this -> family as $ cnr => $ child ) { $ this -> verboseOutput ( "<info>Child: $cnr </info>" . $ child -> status ) ; } $ this -> tellChildrenToPrepareForBed ( ) ; } else { $ this -> keepWorking = false ; } return ; } list ( $ shouldHaveLessWorkers , $ shouldHaveMoreWorkers ) = $ this -> moreOrLess ( $ total , $ available ) ; if ( $ shouldHaveMoreWorkers ) { $ this -> family [ ] = $ this -> spawnChild ( ) ; } if ( $ shouldHaveLessWorkers ) { //find one of the family members not doing anything and cap it! if ( $ this -> findDisposableWorkers ( ) ) { //we found one $ this -> verboseOutput ( "<info>Found a disposable worker</info>" ) ; } } }
docstring: Produce more hands for the work needed
  
  @return void
docstring_tokens: Produce more hands for the work needed