original_string: public function getSqlQueriesToExecute()
      {
          $queries = array();
          $classNames = array();
  
          foreach ($this->componentsWithUpdateFile as $componentName => $componentUpdateInfo) {
              foreach ($componentUpdateInfo as $file => $fileVersion) {
                  require_once $file; // prefixed by PIWIK_INCLUDE_PATH
  
                  $className = $this->getUpdateClassName($componentName, $fileVersion);
                  if (!class_exists($className, false)) {
                      throw new \Exception("The class $className was not found in $file");
                  }
  
                  if (in_array($className, $classNames)) {
                      continue; // prevent from getting updates from Piwik\Columns\Updater multiple times
                  }
  
                  $classNames[] = $className;
  
                  /** @var Updates $update */
                  $update = StaticContainer::getContainer()->make($className);
                  $migrationsForComponent = $update->getMigrations($this);
                  foreach ($migrationsForComponent as $index => $migration) {
                      $migration = $this->keepBcForOldMigrationQueryFormat($index, $migration);
                      $queries[] = $migration;
                  }
                  $this->hasMajorDbUpdate = $this->hasMajorDbUpdate || call_user_func(array($className, 'isMajorUpdate'));
              }
          }
          return $queries;
      }
code: public function getSqlQueriesToExecute()
      {
          $queries = array();
          $classNames = array();
  
          foreach ($this->componentsWithUpdateFile as $componentName => $componentUpdateInfo) {
              foreach ($componentUpdateInfo as $file => $fileVersion) {
                  require_once $file; // prefixed by PIWIK_INCLUDE_PATH
  
                  $className = $this->getUpdateClassName($componentName, $fileVersion);
                  if (!class_exists($className, false)) {
                      throw new \Exception("The class $className was not found in $file");
                  }
  
                  if (in_array($className, $classNames)) {
                      continue; // prevent from getting updates from Piwik\Columns\Updater multiple times
                  }
  
                  $classNames[] = $className;
  
                  /** @var Updates $update */
                  $update = StaticContainer::getContainer()->make($className);
                  $migrationsForComponent = $update->getMigrations($this);
                  foreach ($migrationsForComponent as $index => $migration) {
                      $migration = $this->keepBcForOldMigrationQueryFormat($index, $migration);
                      $queries[] = $migration;
                  }
                  $this->hasMajorDbUpdate = $this->hasMajorDbUpdate || call_user_func(array($className, 'isMajorUpdate'));
              }
          }
          return $queries;
      }
code_tokens: public function getSqlQueriesToExecute ( ) { $ queries = array ( ) ; $ classNames = array ( ) ; foreach ( $ this -> componentsWithUpdateFile as $ componentName => $ componentUpdateInfo ) { foreach ( $ componentUpdateInfo as $ file => $ fileVersion ) { require_once $ file ; // prefixed by PIWIK_INCLUDE_PATH $ className = $ this -> getUpdateClassName ( $ componentName , $ fileVersion ) ; if ( ! class_exists ( $ className , false ) ) { throw new \ Exception ( "The class $className was not found in $file" ) ; } if ( in_array ( $ className , $ classNames ) ) { continue ; // prevent from getting updates from Piwik\Columns\Updater multiple times } $ classNames [ ] = $ className ; /** @var Updates $update */ $ update = StaticContainer :: getContainer ( ) -> make ( $ className ) ; $ migrationsForComponent = $ update -> getMigrations ( $ this ) ; foreach ( $ migrationsForComponent as $ index => $ migration ) { $ migration = $ this -> keepBcForOldMigrationQueryFormat ( $ index , $ migration ) ; $ queries [ ] = $ migration ; } $ this -> hasMajorDbUpdate = $ this -> hasMajorDbUpdate || call_user_func ( array ( $ className , 'isMajorUpdate' ) ) ; } } return $ queries ; }
docstring: Returns the list of SQL queries that would be executed during the update
  
  @return Migration[] of SQL queries
  @throws \Exception
docstring_tokens: Returns the list of SQL queries that would be executed during the update