original_string: public function generateCommands(array $classes = [])
      {
          $classes  = $this->readApis($classes);
          $token    = $this->token->read();
          $commands = [];
  
          foreach ($classes as $class) {
              $api = new \ReflectionClass($class);
  
              foreach ($api->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
                  if (0 !== strpos($method->getName(), '__')) { //skip magics
                      $command                       = $this->generateCommand($api->getShortName(), $method, $token);
                      $commands[$command->getName()] = $command;
                  }
              }
          }
  
          return $commands;
      }
code: public function generateCommands(array $classes = [])
      {
          $classes  = $this->readApis($classes);
          $token    = $this->token->read();
          $commands = [];
  
          foreach ($classes as $class) {
              $api = new \ReflectionClass($class);
  
              foreach ($api->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
                  if (0 !== strpos($method->getName(), '__')) { //skip magics
                      $command                       = $this->generateCommand($api->getShortName(), $method, $token);
                      $commands[$command->getName()] = $command;
                  }
              }
          }
  
          return $commands;
      }
code_tokens: public function generateCommands ( array $ classes = [ ] ) { $ classes = $ this -> readApis ( $ classes ) ; $ token = $ this -> token -> read ( ) ; $ commands = [ ] ; foreach ( $ classes as $ class ) { $ api = new \ ReflectionClass ( $ class ) ; foreach ( $ api -> getMethods ( \ ReflectionMethod :: IS_PUBLIC ) as $ method ) { if ( 0 !== strpos ( $ method -> getName ( ) , '__' ) ) { //skip magics $ command = $ this -> generateCommand ( $ api -> getShortName ( ) , $ method , $ token ) ; $ commands [ $ command -> getName ( ) ] = $ command ; } } } return $ commands ; }
docstring: generates Commands from all Api Methods.
  
  @param array $classes
  
  @return Command[]
docstring_tokens: generates Commands from all Api Methods .