original_string: private function generateWrapperClass(): void
    {
      $this->io->title('Wrapper');
  
      /** @var NameMangler $mangler */
      $mangler  = new $this->nameMangler();
      $routines = $this->readRoutineMetadata();
  
      if (!empty($routines))
      {
        // Sort routines by their wrapper method name.
        $sorted_routines = [];
        foreach ($routines as $routine)
        {
          $method_name                   = $mangler->getMethodName($routine['routine_name']);
          $sorted_routines[$method_name] = $routine;
        }
        ksort($sorted_routines);
  
        // Write methods for each stored routine.
        foreach ($sorted_routines as $method_name => $routine)
        {
          // If routine type is hidden don't create routine wrapper.
          if ($routine['designation']!='hidden')
          {
            $this->writeRoutineFunction($routine, $mangler);
          }
        }
      }
      else
      {
        echo "No files with stored routines found.\n";
      }
  
      $wrappers        = $this->codeStore->getRawCode();
      $this->codeStore = new PhpCodeStore();
  
      // Write the header of the wrapper class.
      $this->writeClassHeader();
  
      // Write methods of the wrapper calls.
      $this->codeStore->append($wrappers, false);
  
      // Write the trailer of the wrapper class.
      $this->writeClassTrailer();
  
      // Write the wrapper class to the filesystem.
      $this->storeWrapperClass();
    }
code: private function generateWrapperClass(): void
    {
      $this->io->title('Wrapper');
  
      /** @var NameMangler $mangler */
      $mangler  = new $this->nameMangler();
      $routines = $this->readRoutineMetadata();
  
      if (!empty($routines))
      {
        // Sort routines by their wrapper method name.
        $sorted_routines = [];
        foreach ($routines as $routine)
        {
          $method_name                   = $mangler->getMethodName($routine['routine_name']);
          $sorted_routines[$method_name] = $routine;
        }
        ksort($sorted_routines);
  
        // Write methods for each stored routine.
        foreach ($sorted_routines as $method_name => $routine)
        {
          // If routine type is hidden don't create routine wrapper.
          if ($routine['designation']!='hidden')
          {
            $this->writeRoutineFunction($routine, $mangler);
          }
        }
      }
      else
      {
        echo "No files with stored routines found.\n";
      }
  
      $wrappers        = $this->codeStore->getRawCode();
      $this->codeStore = new PhpCodeStore();
  
      // Write the header of the wrapper class.
      $this->writeClassHeader();
  
      // Write methods of the wrapper calls.
      $this->codeStore->append($wrappers, false);
  
      // Write the trailer of the wrapper class.
      $this->writeClassTrailer();
  
      // Write the wrapper class to the filesystem.
      $this->storeWrapperClass();
    }
code_tokens: private function generateWrapperClass ( ) : void { $ this -> io -> title ( 'Wrapper' ) ; /** @var NameMangler $mangler */ $ mangler = new $ this -> nameMangler ( ) ; $ routines = $ this -> readRoutineMetadata ( ) ; if ( ! empty ( $ routines ) ) { // Sort routines by their wrapper method name. $ sorted_routines = [ ] ; foreach ( $ routines as $ routine ) { $ method_name = $ mangler -> getMethodName ( $ routine [ 'routine_name' ] ) ; $ sorted_routines [ $ method_name ] = $ routine ; } ksort ( $ sorted_routines ) ; // Write methods for each stored routine. foreach ( $ sorted_routines as $ method_name => $ routine ) { // If routine type is hidden don't create routine wrapper. if ( $ routine [ 'designation' ] != 'hidden' ) { $ this -> writeRoutineFunction ( $ routine , $ mangler ) ; } } } else { echo "No files with stored routines found.\n" ; } $ wrappers = $ this -> codeStore -> getRawCode ( ) ; $ this -> codeStore = new PhpCodeStore ( ) ; // Write the header of the wrapper class. $ this -> writeClassHeader ( ) ; // Write methods of the wrapper calls. $ this -> codeStore -> append ( $ wrappers , false ) ; // Write the trailer of the wrapper class. $ this -> writeClassTrailer ( ) ; // Write the wrapper class to the filesystem. $ this -> storeWrapperClass ( ) ; }
docstring: Generates the wrapper class.
docstring_tokens: Generates the wrapper class .