original_string: public function importCitations($oldArticleId, $article)
      {
          $this->consoleOutput->writeln("Reading citations...");
  
          $citationSql = "SELECT * FROM citations WHERE assoc_id = :id";
          $citationStatement = $this->dbalConnection->prepare($citationSql);
          $citationStatement->bindValue('id', $oldArticleId);
          $citationStatement->execute();
  
          $orderCounter = 0;
          $citations = $citationStatement->fetchAll();
          foreach ($citations as $pkpCitation) {
              $citation = new Citation();
              $citation->setRaw(!empty($pkpCitation['raw_citation']) ? $pkpCitation['raw_citation'] : '-');
              $citation->setOrderNum(!empty($pkpCitation['seq']) ? $pkpCitation['seq'] : $orderCounter);
              $article->addCitation($citation);
  
              $orderCounter++;
          }
      }
code: public function importCitations($oldArticleId, $article)
      {
          $this->consoleOutput->writeln("Reading citations...");
  
          $citationSql = "SELECT * FROM citations WHERE assoc_id = :id";
          $citationStatement = $this->dbalConnection->prepare($citationSql);
          $citationStatement->bindValue('id', $oldArticleId);
          $citationStatement->execute();
  
          $orderCounter = 0;
          $citations = $citationStatement->fetchAll();
          foreach ($citations as $pkpCitation) {
              $citation = new Citation();
              $citation->setRaw(!empty($pkpCitation['raw_citation']) ? $pkpCitation['raw_citation'] : '-');
              $citation->setOrderNum(!empty($pkpCitation['seq']) ? $pkpCitation['seq'] : $orderCounter);
              $article->addCitation($citation);
  
              $orderCounter++;
          }
      }
code_tokens: public function importCitations ( $ oldArticleId , $ article ) { $ this -> consoleOutput -> writeln ( "Reading citations..." ) ; $ citationSql = "SELECT * FROM citations WHERE assoc_id = :id" ; $ citationStatement = $ this -> dbalConnection -> prepare ( $ citationSql ) ; $ citationStatement -> bindValue ( 'id' , $ oldArticleId ) ; $ citationStatement -> execute ( ) ; $ orderCounter = 0 ; $ citations = $ citationStatement -> fetchAll ( ) ; foreach ( $ citations as $ pkpCitation ) { $ citation = new Citation ( ) ; $ citation -> setRaw ( ! empty ( $ pkpCitation [ 'raw_citation' ] ) ? $ pkpCitation [ 'raw_citation' ] : '-' ) ; $ citation -> setOrderNum ( ! empty ( $ pkpCitation [ 'seq' ] ) ? $ pkpCitation [ 'seq' ] : $ orderCounter ) ; $ article -> addCitation ( $ citation ) ; $ orderCounter ++ ; } }
docstring: Imports citations of the given article.
  @param int $oldArticleId Old article's ID
  @param Article $article  Newly imported Article's entity
docstring_tokens: Imports citations of the given article .