original_string: public function toSql(Connection $connection, Grammar $grammar)
      {
          $this->addImpliedCommands();
  
          $statements = [];
  
          // Each type of command has a corresponding compiler function on the schema
          // grammar which is used to build the necessary SQL statements to build
          // the blueprint element, so we'll just call that compilers function.
          foreach ($this->commands as $command) {
              $method = 'compile' . ucfirst($command->name);
  
              if (method_exists($grammar, $method)) {
                  if (!is_null($sql = $grammar->{$method}($this, $command, $connection))) {
                      $statements = array_merge($statements, (array) $sql);
                  }
              }
          }
  
          return $statements;
      }
code: public function toSql(Connection $connection, Grammar $grammar)
      {
          $this->addImpliedCommands();
  
          $statements = [];
  
          // Each type of command has a corresponding compiler function on the schema
          // grammar which is used to build the necessary SQL statements to build
          // the blueprint element, so we'll just call that compilers function.
          foreach ($this->commands as $command) {
              $method = 'compile' . ucfirst($command->name);
  
              if (method_exists($grammar, $method)) {
                  if (!is_null($sql = $grammar->{$method}($this, $command, $connection))) {
                      $statements = array_merge($statements, (array) $sql);
                  }
              }
          }
  
          return $statements;
      }
code_tokens: public function toSql ( Connection $ connection , Grammar $ grammar ) { $ this -> addImpliedCommands ( ) ; $ statements = [ ] ; // Each type of command has a corresponding compiler function on the schema // grammar which is used to build the necessary SQL statements to build // the blueprint element, so we'll just call that compilers function. foreach ( $ this -> commands as $ command ) { $ method = 'compile' . ucfirst ( $ command -> name ) ; if ( method_exists ( $ grammar , $ method ) ) { if ( ! is_null ( $ sql = $ grammar -> { $ method } ( $ this , $ command , $ connection ) ) ) { $ statements = array_merge ( $ statements , ( array ) $ sql ) ; } } } return $ statements ; }
docstring: Get the raw SQL statements for the blueprint.
  
  @param \Mellivora\Database\Connection              $connection
  @param \Mellivora\Database\Schema\Grammars\Grammar $grammar
  
  @return array
docstring_tokens: Get the raw SQL statements for the blueprint .