original_string: protected function ensureCommandsAreValid(Connection $connection)
      {
          if ($connection instanceof SQLiteConnection) {
              if ($this->commandsNamed(['dropColumn', 'renameColumn'])->count() > 1) {
                  throw new BadMethodCallException(
                      "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification."
                  );
              }
  
              if ($this->commandsNamed(['dropForeign'])->count() > 0) {
                  throw new BadMethodCallException(
                      "SQLite doesn't support dropping foreign keys (you would need to re-create the table)."
                  );
              }
          }
      }
code: protected function ensureCommandsAreValid(Connection $connection)
      {
          if ($connection instanceof SQLiteConnection) {
              if ($this->commandsNamed(['dropColumn', 'renameColumn'])->count() > 1) {
                  throw new BadMethodCallException(
                      "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification."
                  );
              }
  
              if ($this->commandsNamed(['dropForeign'])->count() > 0) {
                  throw new BadMethodCallException(
                      "SQLite doesn't support dropping foreign keys (you would need to re-create the table)."
                  );
              }
          }
      }
code_tokens: protected function ensureCommandsAreValid ( Connection $ connection ) { if ( $ connection instanceof SQLiteConnection ) { if ( $ this -> commandsNamed ( [ 'dropColumn' , 'renameColumn' ] ) -> count ( ) > 1 ) { throw new BadMethodCallException ( "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification." ) ; } if ( $ this -> commandsNamed ( [ 'dropForeign' ] ) -> count ( ) > 0 ) { throw new BadMethodCallException ( "SQLite doesn't support dropping foreign keys (you would need to re-create the table)." ) ; } } }
docstring: Ensure the commands on the blueprint are valid for the connection type.
  
  @param  \Illuminate\Database\Connection  $connection
  @return void
  
  @throws \BadMethodCallException
docstring_tokens: Ensure the commands on the blueprint are valid for the connection type .