original_string: public function seedTask(Option $option)
      {
          $name = $option->getArg(0);
          $databases = $this->getDatabases($option);
          
          $start = microtime(true);
          foreach ($databases as $alias => $database) {
              foreach ($this->migrationHelper->getSeeders($alias, $name) as $seeder) {
                  try {
                      $this->sendMessage('seeding... -> %s', $seeder->getName());
                      $seeder->seed();
                  } catch (\Exception $e) {
                      $this->sendMessage($e->getMessage());
                      $this->sendMessage('has error. aborting.');
                      return;
                  }
              }
          }
          $end = microtime(true);
  
          $this->sendMessage('');
          $this->sendMessage('All Done. Took %.4fs', $end - $start);
      }
code: public function seedTask(Option $option)
      {
          $name = $option->getArg(0);
          $databases = $this->getDatabases($option);
          
          $start = microtime(true);
          foreach ($databases as $alias => $database) {
              foreach ($this->migrationHelper->getSeeders($alias, $name) as $seeder) {
                  try {
                      $this->sendMessage('seeding... -> %s', $seeder->getName());
                      $seeder->seed();
                  } catch (\Exception $e) {
                      $this->sendMessage($e->getMessage());
                      $this->sendMessage('has error. aborting.');
                      return;
                  }
              }
          }
          $end = microtime(true);
  
          $this->sendMessage('');
          $this->sendMessage('All Done. Took %.4fs', $end - $start);
      }
code_tokens: public function seedTask ( Option $ option ) { $ name = $ option -> getArg ( 0 ) ; $ databases = $ this -> getDatabases ( $ option ) ; $ start = microtime ( true ) ; foreach ( $ databases as $ alias => $ database ) { foreach ( $ this -> migrationHelper -> getSeeders ( $ alias , $ name ) as $ seeder ) { try { $ this -> sendMessage ( 'seeding... -> %s' , $ seeder -> getName ( ) ) ; $ seeder -> seed ( ) ; } catch ( \ Exception $ e ) { $ this -> sendMessage ( $ e -> getMessage ( ) ) ; $ this -> sendMessage ( 'has error. aborting.' ) ; return ; } } } $ end = microtime ( true ) ; $ this -> sendMessage ( '' ) ; $ this -> sendMessage ( 'All Done. Took %.4fs' , $ end - $ start ) ; }
docstring: database seeding task.
  
  usage:
  # all seeding files import.
  $ ./app db:seed
  
  # target seeding file import.
  $ ./app db:seed [name] --database=base
  
  seeder file:
  App/Database/Seed/[database alias]/[name]Seeder.php
  
  @option      database,d=all      target database (default is all databases).
docstring_tokens: database seeding task .